diff --git a/maomao.c b/maomao.c index c21b894..26b6986 100644 --- a/maomao.c +++ b/maomao.c @@ -6699,7 +6699,7 @@ void viewtoright_have_client(const Arg *arg) { for (target <<= 1; target & TAGMASK; target <<= 1, n++) { wl_list_for_each(c, &clients, link) { - if (target & c->tags) { + if (c->mon == selmon && target & c->tags) { found = 1; break; } @@ -6773,7 +6773,7 @@ void viewtoleft_have_client(const Arg *arg) { for (target >>= 1; target > 0; target >>= 1, n++) { wl_list_for_each(c, &clients, link) { - if (target & c->tags) { + if (c->mon == selmon && target & c->tags) { found = 1; break; }