On Sun, Jan 15, 2012 at 07:29:13AM +0100, Anselm R Garbe wrote: > On 15 January 2012 07:27, Anselm R Garbe <garb...@gmail.com> wrote: > > On 15 January 2012 00:26, Ivan Kanakarakis <ivan.ka...@gmail.com> wrote: > >> On 15 January 2012 00:52, Andreas Amann <am...@physik.tu-berlin.de> wrote: > >>> just to ask, do you happen to have the command "wmname LG3D" in your > >>> startup > >>> script or anything else which changes _NET_WM_NAME? > >>> > >> > >> I actually do have "wmname LG3D" > >> I'm not home right now to test, but I'll report once I'm back > > > > Bare in mind that the wmname LG3D trick only fixed a bug of the JDK. > > It is not related to chromium at all. > > correction: s/fixed/works around/
The problem is that Ivan uses wmname to set _NET_WM_NAME to "LG3D". Actually chromium does not care about _NET_WM_NAME. But "wmname" has a dirty side effect, it sets the _NET_SUPPORTING_WM_CHECK property of the root window to the window id of the root window. That is clearly against EWMH rules and it would be better if wmname would leave _NET_SUPPORTING_WM_CHECK alone. I guess Chromium for some reason is smart enough to figure out that _NET_SUPPORTING_WM_CHECK is not set correctly, and therefore seems to decide that it cannot trust the wm. The correct solution is therefore not to use "wmname". To address Ivan's other problem with NetActiveWindow, you might consider to include the attached patch. It is similar to the patch I sent previously, but I cut out the NetClientList part. Andreas
# HG changeset patch # Parent bbfe55c2f7562ea3e428d4c7cbd1d8da0c32f02f diff --git a/dwm.c b/dwm.c --- a/dwm.c +++ b/dwm.c @@ -499,6 +500,7 @@ cleanupmon(mons); XSync(dpy, False); XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); + XDeleteProperty(dpy, root, netatom[NetActiveWindow]); } void @@ -858,8 +860,10 @@ XSetWindowBorder(dpy, c->win, dc.sel[ColBorder]); setfocus(c); } - else + else { XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); + XDeleteProperty(dpy, root, netatom[NetActiveWindow]); + } selmon->sel = c; drawbars(); } @@ -1520,8 +1526,12 @@ void setfocus(Client *c) { - if(!c->neverfocus) + if(!c->neverfocus) { XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime); + XChangeProperty(dpy, root, netatom[NetActiveWindow], + XA_WINDOW, 32, PropModeReplace, + (unsigned char *) &(c->win), 1); + } sendevent(c, wmatom[WMTakeFocus]); } @@ -1777,8 +1789,10 @@ return; grabbuttons(c, False); XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]); - if(setfocus) + if(setfocus) { XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); + XDeleteProperty(dpy, root, netatom[NetActiveWindow]); + } } void