I came up with the following solution:
in client.c, add to focus() ;
...
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
XUngrabButton(dpy, AnyButton, 0, c->win); /* this line added */
XSync(dpy, False);
...
and in draw.c, add to drawtitle() ;
...
XCopyArea(dpy, dc.drawable, c->title, dc.gc, 0, 0, c->tw, c->th, 0, 0);
XGrabButton(dpy, AnyButton, 0, c->win, False, 0, GrabModeAsync,
GrabModeAsync, None, None); /* this line added */
XSync(dpy, False);
...
> I normally like click-to-focus, and have been trying to work out how to
> modify DWM to do this. This is harder than I thought, as it seems the
> server makes an automatic button grab when any mouse buttons are pressed
> over a client, as such, DWM wouldn't receive these events. I guess the
> modification would entail DWM automatically grabbing buttons for any newly
> created client windows.
>
Received on Sat Aug 05 2006 - 04:16:36 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 14:29:57 UTC