it* dwm + patches Err codevoid.de 70 i Err codevoid.de 70 hgit clone git://git.codevoid.de/dwm-sdk URL:git://git.codevoid.de/dwm-sdk codevoid.de 70 1Log /git/dwm-sdk/log.gph codevoid.de 70 1Files /git/dwm-sdk/files.gph codevoid.de 70 1Refs /git/dwm-sdk/refs.gph codevoid.de 70 1README /git/dwm-sdk/file/README.gph codevoid.de 70 1LICENSE /git/dwm-sdk/file/LICENSE.gph codevoid.de 70 i--- Err codevoid.de 70 1commit 022d07605412bc5bd9726f74af9355c562ba4957 /git/dwm-sdk/commit/022d07605412bc5bd9726f74af9355c562ba4957.gph codevoid.de 70 1parent 2952b68db88f38be8d34b80c7a7d2c7eb5b2484d /git/dwm-sdk/commit/2952b68db88f38be8d34b80c7a7d2c7eb5b2484d.gph codevoid.de 70 hAuthor: Markus Teich URL:mailto:markus.teich@stusta.mhn.de codevoid.de 70 iDate: Sat, 7 Jan 2017 17:21:29 +0100 Err codevoid.de 70 i Err codevoid.de 70 iButton passthrough when client is not focused Err codevoid.de 70 i Err codevoid.de 70 iBefore this change it is not possible to press a button in a client on the first Err codevoid.de 70 iclick if the client is not yet focused. The first click on the button would Err codevoid.de 70 ionly focus the client and a second click on the button is needed to activate it. Err codevoid.de 70 iThis situation can occur when moving the mouse over a client (therefore focusing Err codevoid.de 70 iit) and then moving the focus to another client with keyboard shortcuts. Err codevoid.de 70 i Err codevoid.de 70 iAfter this commit the behavior is fixed and button presses on unfocused clients Err codevoid.de 70 iare passed to the client correctly. Err codevoid.de 70 i Err codevoid.de 70 iDiffstat: Err codevoid.de 70 i M dwm.c | 21 +++++++++++---------- Err codevoid.de 70 i Err codevoid.de 70 i1 file changed, 11 insertions(+), 10 deletions(-) Err codevoid.de 70 i--- Err codevoid.de 70 1diff --git a/dwm.c b/dwm.c /git/dwm-sdk/file/dwm.c.gph codevoid.de 70 it@@ -446,6 +446,8 @@ buttonpress(XEvent *e) Err codevoid.de 70 i click = ClkWinTitle; Err codevoid.de 70 i } else if ((c = wintoclient(ev->window))) { Err codevoid.de 70 i focus(c); Err codevoid.de 70 i+ restack(selmon); Err codevoid.de 70 i+ XAllowEvents(dpy, ReplayPointer, CurrentTime); Err codevoid.de 70 i click = ClkClientWin; Err codevoid.de 70 i } Err codevoid.de 70 i for (i = 0; i < LENGTH(buttons); i++) Err codevoid.de 70 it@@ -932,17 +934,16 @@ grabbuttons(Client *c, int focused) Err codevoid.de 70 i unsigned int i, j; Err codevoid.de 70 i unsigned int modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask }; Err codevoid.de 70 i XUngrabButton(dpy, AnyButton, AnyModifier, c->win); Err codevoid.de 70 i- if (focused) { Err codevoid.de 70 i- for (i = 0; i < LENGTH(buttons); i++) Err codevoid.de 70 i- if (buttons[i].click == ClkClientWin) Err codevoid.de 70 i- for (j = 0; j < LENGTH(modifiers); j++) Err codevoid.de 70 i- XGrabButton(dpy, buttons[i].button, Err codevoid.de 70 i- buttons[i].mask | modifiers[j], Err codevoid.de 70 i- c->win, False, BUTTONMASK, Err codevoid.de 70 i- GrabModeAsync, GrabModeSync, None, None); Err codevoid.de 70 i- } else Err codevoid.de 70 i+ if (!focused) Err codevoid.de 70 i XGrabButton(dpy, AnyButton, AnyModifier, c->win, False, Err codevoid.de 70 i- BUTTONMASK, GrabModeAsync, GrabModeSync, None, None); Err codevoid.de 70 i+ BUTTONMASK, GrabModeSync, GrabModeSync, None, None); Err codevoid.de 70 i+ for (i = 0; i < LENGTH(buttons); i++) Err codevoid.de 70 i+ if (buttons[i].click == ClkClientWin) Err codevoid.de 70 i+ for (j = 0; j < LENGTH(modifiers); j++) Err codevoid.de 70 i+ XGrabButton(dpy, buttons[i].button, Err codevoid.de 70 i+ buttons[i].mask | modifiers[j], Err codevoid.de 70 i+ c->win, False, BUTTONMASK, Err codevoid.de 70 i+ GrabModeAsync, GrabModeSync, None, None); Err codevoid.de 70 i } Err codevoid.de 70 i } Err codevoid.de 70 i Err codevoid.de 70 .