fix: use current monitor only

This commit is contained in:
hayato-oo 2025-10-26 00:31:34 -04:00
parent c20a4139a1
commit 27bae1db47

View file

@ -150,8 +150,7 @@ Client *find_client_by_direction(Client *tc, const Arg *arg, bool findfloating,
// 第一次遍历,计算客户端数量 // 第一次遍历,计算客户端数量
wl_list_for_each(c, &clients, link) { wl_list_for_each(c, &clients, link) {
if (c && (findfloating || !c->isfloating) && !c->isunglobal && if (c && (findfloating || !c->isfloating) && !c->isunglobal &&
(focus_cross_monitor || c->mon == selmon) && c->mon == selmon && (c->tags & c->mon->tagset[c->mon->seltags])) {
(c->tags & c->mon->tagset[c->mon->seltags])) {
last++; last++;
} }
} }
@ -171,8 +170,7 @@ Client *find_client_by_direction(Client *tc, const Arg *arg, bool findfloating,
last = -1; last = -1;
wl_list_for_each(c, &clients, link) { wl_list_for_each(c, &clients, link) {
if (c && (findfloating || !c->isfloating) && !c->isunglobal && if (c && (findfloating || !c->isfloating) && !c->isunglobal &&
(focus_cross_monitor || c->mon == selmon) && c->mon == selmon && (c->tags & c->mon->tagset[c->mon->seltags])) {
(c->tags & c->mon->tagset[c->mon->seltags])) {
last++; last++;
tempClients[last] = c; tempClients[last] = c;
} }