diff --git a/common/swindow.c b/common/swindow.c index cd0fa2675..cc1ad1b12 100644 --- a/common/swindow.c +++ b/common/swindow.c @@ -51,10 +51,10 @@ simplewindow_new(Display *disp, int phys_screen, int x, int y, sw->phys_screen = phys_screen; wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask - | EnterWindowMask | LeaveWindowMask | StructureNotifyMask; + | EnterWindowMask | LeaveWindowMask | StructureNotifyMask + | ButtonPressMask | ExposureMask; wa.override_redirect = 1; wa.background_pixmap = ParentRelative; - wa.event_mask = ButtonPressMask | ExposureMask; sw->window = XCreateWindow(disp, RootWindow(disp, phys_screen), x, y, w, h, @@ -65,6 +65,8 @@ simplewindow_new(Display *disp, int phys_screen, int x, int y, CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); + XSelectInput(disp, sw->window, wa.event_mask); + sw->drawable = XCreatePixmap(disp, RootWindow(disp, phys_screen), w, h,