feat: add option focus_cross_monitor

This commit is contained in:
DreamMaoMao 2025-03-25 10:15:54 +08:00
parent 6ec95b52a5
commit 5c7dfa41b5
4 changed files with 9 additions and 2 deletions

View file

@ -1697,7 +1697,7 @@ Client *direction_select(const Arg *arg) {
// 第一次遍历,计算客户端数量
wl_list_for_each(c, &clients, link) {
if (c && (c->tags & c->mon->tagset[c->mon->seltags])) {
if (c && (focus_cross_monitor || c->mon == selmon) && (c->tags & c->mon->tagset[c->mon->seltags])) {
last++;
}
}
@ -1716,7 +1716,7 @@ Client *direction_select(const Arg *arg) {
// 第二次遍历,填充 tempClients
last = -1;
wl_list_for_each(c, &clients, link) {
if (c && (c->tags & c->mon->tagset[c->mon->seltags])) {
if (c && (focus_cross_monitor || c->mon == selmon) && (c->tags & c->mon->tagset[c->mon->seltags])) {
last++;
tempClients[last] = c;
}