aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-05-02 20:13:09 -0400
committerJesse Luehrs <doy@tozt.net>2014-05-02 20:13:09 -0400
commitde572a1bad4c390f14ab928c7f94d1f32a241552 (patch)
treeb2b6ade06d56737850e6e7ff26c4521c2d1264d8
parent612403d9ff2e3e6c478a0b45f59847c19f0e00d2 (diff)
downloadrunes-de572a1bad4c390f14ab928c7f94d1f32a241552.tar.gz
runes-de572a1bad4c390f14ab928c7f94d1f32a241552.zip
clean up event masks
-rw-r--r--src/window-xlib.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/window-xlib.c b/src/window-xlib.c
index 59b2849..646bec9 100644
--- a/src/window-xlib.c
+++ b/src/window-xlib.c
@@ -213,14 +213,17 @@ void runes_window_backend_create_window(RunesTerm *t, int argc, char *argv[])
void runes_window_backend_start_loop(RunesTerm *t)
{
RunesWindowBackend *w = &t->w;
- unsigned long mask;
+ unsigned long xim_mask, common_mask;
void *data;
- XGetICValues(w->ic, XNFilterEvents, &mask, NULL);
- XSelectInput(w->dpy, w->border_w, mask|KeyPressMask|StructureNotifyMask);
+ XGetICValues(w->ic, XNFilterEvents, &xim_mask, NULL);
+ common_mask = KeyPressMask|EnterWindowMask|LeaveWindowMask|FocusChangeMask;
+
+ XSelectInput(
+ w->dpy, w->border_w, xim_mask|common_mask|StructureNotifyMask);
XSelectInput(
w->dpy, w->w,
- mask|KeyPressMask|ButtonPressMask|ButtonReleaseMask|ButtonMotionMask|PointerMotionHintMask|EnterWindowMask|LeaveWindowMask|StructureNotifyMask|ExposureMask|FocusChangeMask);
+ xim_mask|common_mask|ButtonPressMask|ButtonReleaseMask|ButtonMotionMask|PointerMotionHintMask|ExposureMask);
XSetICFocus(w->ic);
data = malloc(sizeof(RunesXlibLoopData));