Select for input in simplewindow
This commit is contained in:
parent
2c43fd6a69
commit
4cab3c2d05
|
@ -51,10 +51,10 @@ simplewindow_new(Display *disp, int phys_screen, int x, int y,
|
||||||
sw->phys_screen = phys_screen;
|
sw->phys_screen = phys_screen;
|
||||||
|
|
||||||
wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask
|
wa.event_mask = SubstructureRedirectMask | SubstructureNotifyMask
|
||||||
| EnterWindowMask | LeaveWindowMask | StructureNotifyMask;
|
| EnterWindowMask | LeaveWindowMask | StructureNotifyMask
|
||||||
|
| ButtonPressMask | ExposureMask;
|
||||||
wa.override_redirect = 1;
|
wa.override_redirect = 1;
|
||||||
wa.background_pixmap = ParentRelative;
|
wa.background_pixmap = ParentRelative;
|
||||||
wa.event_mask = ButtonPressMask | ExposureMask;
|
|
||||||
sw->window = XCreateWindow(disp,
|
sw->window = XCreateWindow(disp,
|
||||||
RootWindow(disp, phys_screen),
|
RootWindow(disp, phys_screen),
|
||||||
x, y, w, h,
|
x, y, w, h,
|
||||||
|
@ -65,6 +65,8 @@ simplewindow_new(Display *disp, int phys_screen, int x, int y,
|
||||||
CWOverrideRedirect | CWBackPixmap | CWEventMask,
|
CWOverrideRedirect | CWBackPixmap | CWEventMask,
|
||||||
&wa);
|
&wa);
|
||||||
|
|
||||||
|
XSelectInput(disp, sw->window, wa.event_mask);
|
||||||
|
|
||||||
sw->drawable = XCreatePixmap(disp,
|
sw->drawable = XCreatePixmap(disp,
|
||||||
RootWindow(disp, phys_screen),
|
RootWindow(disp, phys_screen),
|
||||||
w, h,
|
w, h,
|
||||||
|
|
Loading…
Reference in New Issue