mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
Trim event_mask to those that the root window actually needs.
This commit is contained in:
parent
207b71ef1c
commit
49f839e194
19
screen.c
19
screen.c
@ -40,7 +40,7 @@ screen_init(int which)
|
||||
{
|
||||
struct screen_ctx *sc;
|
||||
Window active = None;
|
||||
XSetWindowAttributes rootattr;
|
||||
XSetWindowAttributes attr;
|
||||
|
||||
sc = xmalloc(sizeof(*sc));
|
||||
|
||||
@ -69,20 +69,17 @@ screen_init(int which)
|
||||
xu_ewmh_net_virtual_roots(sc);
|
||||
active = xu_ewmh_get_net_active_window(sc);
|
||||
|
||||
rootattr.cursor = Conf.cursor[CF_NORMAL];
|
||||
rootattr.event_mask = SubstructureRedirectMask |
|
||||
SubstructureNotifyMask | PropertyChangeMask | EnterWindowMask |
|
||||
LeaveWindowMask | ColormapChangeMask | BUTTONMASK;
|
||||
|
||||
XChangeWindowAttributes(X_Dpy, sc->rootwin,
|
||||
(CWEventMask | CWCursor), &rootattr);
|
||||
|
||||
screen_scan(sc, active);
|
||||
screen_updatestackingorder(sc);
|
||||
attr.cursor = Conf.cursor[CF_NORMAL];
|
||||
attr.event_mask = SubstructureRedirectMask | SubstructureNotifyMask |
|
||||
EnterWindowMask | PropertyChangeMask | ButtonPressMask;
|
||||
XChangeWindowAttributes(X_Dpy, sc->rootwin, (CWEventMask | CWCursor), &attr);
|
||||
|
||||
if (Conf.xrandr)
|
||||
XRRSelectInput(X_Dpy, sc->rootwin, RRScreenChangeNotifyMask);
|
||||
|
||||
screen_scan(sc, active);
|
||||
screen_updatestackingorder(sc);
|
||||
|
||||
TAILQ_INSERT_TAIL(&Screenq, sc, entry);
|
||||
|
||||
XSync(X_Dpy, False);
|
||||
|
Loading…
Reference in New Issue
Block a user