commit 2acfb3a61f593339e650775ceba18eff3702826d
parent 943e0c0311350404f65c1c7452c5697cbc70b3a5
Author: jona <ein.jona.mit.f@gmail.com>
Date: Sat, 1 May 2021 15:52:31 +0200
dont focus virtual keyboard while using it
"focus" is bit ambiguous, as dwm keeps its own "selected client" apart from
x's inputfocus and active window. This change prevents dwm to select the
keyboard when pressing on it.
In effect the windowtitle in the bar doesn't get overwritten by the keyboard
and the bordercolors don't change, which i think is the correct behavior.
The inputfocus is already denied because svkbd reports WM_Hints->input->false
to the windowmanager, which is why the keyboard was working before.
Signed-off-by: Stacy Harper <contact@stacyharper.net>
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dwm.c b/dwm.c
@@ -642,8 +642,10 @@ buttonpress(XEvent *e)
else // Focus clicked tab bar item
bartabcalculate(selmon, x, TEXTW(stext) - lrpad + 2, ev->x, battabclick);
} else if ((c = wintoclient(ev->window))) {
- focus(c);
- restack(selmon);
+ if (!c->iskbd) {
+ focus(c);
+ restack(selmon);
+ }
XAllowEvents(dpy, ReplayPointer, CurrentTime);
click = ClkClientWin;
}