mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
grab events on the root window *before* we look for existing windows.
This closes a race we were hitting often where stuff started right before cwm may not get noticed and not have borders. ok okan@. Prompted by something todd noticed.
This commit is contained in:
parent
b12e6fc5cd
commit
a292c96977
12
calmwm.c
12
calmwm.c
@ -176,6 +176,12 @@ x_setupscreen(struct screen_ctx *sc, u_int which)
|
|||||||
|
|
||||||
xu_setwmname(sc);
|
xu_setwmname(sc);
|
||||||
|
|
||||||
|
rootattr.event_mask = ChildMask|PropertyChangeMask|EnterWindowMask|
|
||||||
|
LeaveWindowMask|ColormapChangeMask|ButtonMask;
|
||||||
|
|
||||||
|
XChangeWindowAttributes(X_Dpy, sc->rootwin,
|
||||||
|
CWEventMask, &rootattr);
|
||||||
|
|
||||||
/* Deal with existing clients. */
|
/* Deal with existing clients. */
|
||||||
XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins);
|
XQueryTree(X_Dpy, sc->rootwin, &w0, &w1, &wins, &nwins);
|
||||||
|
|
||||||
@ -190,12 +196,6 @@ x_setupscreen(struct screen_ctx *sc, u_int which)
|
|||||||
|
|
||||||
screen_updatestackingorder(sc);
|
screen_updatestackingorder(sc);
|
||||||
|
|
||||||
rootattr.event_mask = ChildMask|PropertyChangeMask|EnterWindowMask|
|
|
||||||
LeaveWindowMask|ColormapChangeMask|ButtonMask;
|
|
||||||
|
|
||||||
XChangeWindowAttributes(X_Dpy, sc->rootwin,
|
|
||||||
CWEventMask, &rootattr);
|
|
||||||
|
|
||||||
if (XineramaQueryExtension(X_Dpy, &fake, &fake) == 1 &&
|
if (XineramaQueryExtension(X_Dpy, &fake, &fake) == 1 &&
|
||||||
((HasXinerama = XineramaIsActive(X_Dpy)) == 1))
|
((HasXinerama = XineramaIsActive(X_Dpy)) == 1))
|
||||||
HasXinerama = 1;
|
HasXinerama = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user