mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 12:05:45 +00:00
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:
parent
9e8d70788c
commit
8120e0b858
7
dwm.c
7
dwm.c
@ -838,9 +838,6 @@ buttonpress(XEvent *e)
|
|||||||
#if BARPADDING_PATCH
|
#if BARPADDING_PATCH
|
||||||
padding -= sp * 2;
|
padding -= sp * 2;
|
||||||
#endif // BARPADDING_PATCH
|
#endif // BARPADDING_PATCH
|
||||||
#if SYSTRAY_PATCH
|
|
||||||
padding -= getsystraywidth();
|
|
||||||
#endif // SYSTRAY_PATCH
|
|
||||||
#if TAGGRID_PATCH
|
#if TAGGRID_PATCH
|
||||||
columns = LENGTH(tags) / tagrows + ((LENGTH(tags) % tagrows > 0) ? 1 : 0);
|
columns = LENGTH(tags) / tagrows + ((LENGTH(tags) % tagrows > 0) ? 1 : 0);
|
||||||
#endif // TAGGRID_PATCH
|
#endif // TAGGRID_PATCH
|
||||||
@ -855,6 +852,10 @@ buttonpress(XEvent *e)
|
|||||||
selmon = m;
|
selmon = m;
|
||||||
focus(NULL);
|
focus(NULL);
|
||||||
}
|
}
|
||||||
|
#if SYSTRAY_PATCH
|
||||||
|
if (showsystray && selmon == systraytomon(selmon))
|
||||||
|
padding -= getsystraywidth();
|
||||||
|
#endif // SYSTRAY_PATCH
|
||||||
if (ev->window == selmon->barwin) {
|
if (ev->window == selmon->barwin) {
|
||||||
i = x = 0;
|
i = x = 0;
|
||||||
#if LEFTLAYOUT_PATCH
|
#if LEFTLAYOUT_PATCH
|
||||||
|
@ -47,8 +47,8 @@ systraytomon(Monitor *m)
|
|||||||
return selmon;
|
return selmon;
|
||||||
return m == selmon ? m : NULL;
|
return m == selmon ? m : NULL;
|
||||||
}
|
}
|
||||||
for (n = 1, t = mons; t && t->next; n++, 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) ;
|
for (i = 1, t = mons; t && t->next && i < systraypinning; i++, t = t->next);
|
||||||
if (systraypinningfailfirst && n < systraypinning)
|
if (systraypinningfailfirst && n < systraypinning)
|
||||||
return mons;
|
return mons;
|
||||||
return t;
|
return t;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user