Fixed a dwmblocks / statuscmd / systray compatibility issue where button clicks would be misaligned if systray pinning is used and systray is on another monitor

This commit is contained in:
bakkeby
2020-07-01 16:16:19 +02:00
parent 9e8d70788c
commit 8120e0b858
2 changed files with 6 additions and 5 deletions

View File

@@ -47,8 +47,8 @@ systraytomon(Monitor *m)
return selmon;
return m == selmon ? m : NULL;
}
for (n = 1, t = mons; t && t->next; n++, t = t->next) ;
for (i = 1, t = mons; t && t->next && i < systraypinning; i++, t = t->next) ;
for (n = 1, t = mons; t && t->next; n++, t = t->next);
for (i = 1, t = mons; t && t->next && i < systraypinning; i++, t = t->next);
if (systraypinningfailfirst && n < systraypinning)
return mons;
return t;