From 0a638a4cafb3dd754a596605bb55ac7977fba71e Mon Sep 17 00:00:00 2001 From: "Anselm R. Garbe" Date: Thu, 13 Jul 2006 12:00:20 +0200 Subject: added pointer warps on kb-driven/manage-driven focus --- client.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client.c b/client.c index f92ac26c..5e7321d2 100644 --- a/client.c +++ b/client.c @@ -101,6 +101,7 @@ sel(void *aux) 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 @@ focus(Client *c) draw_client(c); XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); XFlush(dpy); + discard_events(EnterWindowMask); } void @@ -279,6 +281,7 @@ manage(Window w, XWindowAttributes *wa) 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); } -- cgit v1.2.3