--- a/client.c Thu Jul 13 11:49:31 2006 +0200
+++ b/client.c Thu Jul 13 12:00:20 2006 +0200
@@ -101,6 +101,7 @@
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 @@
draw_client(c);
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
XFlush(dpy);
+ discard_events(EnterWindowMask);
}
void
@@ -279,6 +281,7 @@
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);
}