added pointer warps on kb-driven/manage-driven focus
Anselm R. Garbe garbeam@wmii.de
Thu, 13 Jul 2006 12:00:20 +0200
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
client.c
→
client.c
@@ -101,6 +101,7 @@ for(c = stack; c && c->snext; c = c->snext);
if(!c) c = stack; craise(c); + XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2); focus(c); }@@ -235,6 +236,7 @@ XSetWindowBorder(dpy, c->win, dc.fg);
draw_client(c); XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); XFlush(dpy); + discard_events(EnterWindowMask); } void@@ -279,6 +281,7 @@ GrabModeAsync, GrabModeSync, None, None);
XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask, GrabModeAsync, GrabModeSync, None, None); arrange(); + XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2); focus(c); }