aewl
diff client.c @ 45:7943c72e34eb
added pointer warps on kb-driven/manage-driven focus
author | Anselm R. Garbe <garbeam@wmii.de> |
---|---|
date | Thu, 13 Jul 2006 12:00:20 +0200 |
parents | a36f95a4841a |
children | 58307ad56ec1 |
line diff
1.1 --- a/client.c Thu Jul 13 11:49:31 2006 +0200 1.2 +++ b/client.c Thu Jul 13 12:00:20 2006 +0200 1.3 @@ -101,6 +101,7 @@ 1.4 if(!c) 1.5 c = stack; 1.6 craise(c); 1.7 + XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2); 1.8 focus(c); 1.9 } 1.10 1.11 @@ -235,6 +236,7 @@ 1.12 draw_client(c); 1.13 XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); 1.14 XFlush(dpy); 1.15 + discard_events(EnterWindowMask); 1.16 } 1.17 1.18 void 1.19 @@ -279,6 +281,7 @@ 1.20 XGrabButton(dpy, Button3, Mod1Mask, c->win, False, ButtonPressMask, 1.21 GrabModeAsync, GrabModeSync, None, None); 1.22 arrange(); 1.23 + XWarpPointer(dpy, None, c->win, 0, 0, 0, 0, c->w / 2, c->h / 2); 1.24 focus(c); 1.25 } 1.26