On Tue, Sep 13, 2011 at 02:18:44AM +0400, Alexander Polakov wrote:
> * Roman Z. <romanz_AT_lavabit.com> [110913 01:42]:
> > Hello!
> >
> > I've deactivated the "focus follows mouse" feature. I did this by
> > commenting out the enternotify event handler:
> >
> > static void (*handler[LASTEvent]) (XEvent *) = {
> > /* [EnterNotify] = enternotify, */
> >
> > But now I'm experiencing this problem: Whenever I click into an
> > unfocused window, it is not handled by the program inside the window.
> > Instead, it only focuses the window. This is most annoying when using
> > GIMP, since you change windows often. I've been trying to find a way to
> > pass clicks directly to unfocused windows and focus them at the same
> > time but I haven't been successful. Any ideas?
>
> Try this (I didn't run it, so no idea if it works).
>
> diff -r 072c62ed10f2 dwm.c
> --- a/dwm.c Fri Jan 07 16:05:22 2011 +0000
> +++ b/dwm.c Tue Sep 13 01:17:10 2011 +0300
> @@ -447,6 +447,7 @@
> }
> else if((c = wintoclient(ev->window))) {
> focus(c);
> + XAllowEvents(dpy, ReplayPointer, CurrentTime);
> click = ClkClientWin;
> }
> for(i = 0; i < LENGTH(buttons); i++)
> @@ -951,11 +952,11 @@
> XGrabButton(dpy, buttons[i].button,
> buttons[i].mask | modifiers[j],
> c->win, False, BUTTONMASK,
> - GrabModeAsync, GrabModeSync, None, None);
> + GrabModeSync, GrabModeSync, None, None);
> }
> else
> XGrabButton(dpy, AnyButton, AnyModifier, c->win, False,
> - BUTTONMASK, GrabModeAsync, GrabModeSync, None, None);
> + BUTTONMASK, GrabModeSync, GrabModeSync, None, None);
> }
> }
>
>
> --
> Alexander Polakov | plhk.ru
Thank you, this works.
Roman
This archive was generated by hypermail 2.2.0 : Wed Sep 14 2011 - 15:24:03 CEST