diff options
author | David Robillard <d@drobilla.net> | 2019-07-22 16:48:22 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-07-23 20:28:56 +0200 |
commit | b00a145fa35024b2112b22777075f6ab41cf6f1f (patch) | |
tree | 95c2d160d23eeef90168a0b699df4eff80858cf4 /pugl/pugl_x11.c | |
parent | 37b8dd230f42e1eeebc6faf48c531f6c1dfa8d8f (diff) | |
download | pugl-b00a145fa35024b2112b22777075f6ab41cf6f1f.tar.gz pugl-b00a145fa35024b2112b22777075f6ab41cf6f1f.tar.bz2 pugl-b00a145fa35024b2112b22777075f6ab41cf6f1f.zip |
X11: Factor out window event mask
Diffstat (limited to 'pugl/pugl_x11.c')
-rw-r--r-- | pugl/pugl_x11.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pugl/pugl_x11.c b/pugl/pugl_x11.c index 398ae05..e0adc31 100644 --- a/pugl/pugl_x11.c +++ b/pugl/pugl_x11.c @@ -56,6 +56,11 @@ enum WmClientStateMessageAction { WM_STATE_TOGGLE }; +static const long eventMask = + (ExposureMask | StructureNotifyMask | FocusChangeMask | + EnterWindowMask | LeaveWindowMask | PointerMotionMask | + ButtonPressMask | ButtonReleaseMask | KeyPressMask | KeyReleaseMask); + PuglInternals* puglInitInternals(void) { @@ -116,11 +121,7 @@ puglCreateWindow(PuglView* view, const char* title) XSetWindowAttributes attr = {0}; attr.colormap = cmap; - attr.event_mask = (ExposureMask | StructureNotifyMask | - EnterWindowMask | LeaveWindowMask | - KeyPressMask | KeyReleaseMask | - ButtonPressMask | ButtonReleaseMask | - PointerMotionMask | FocusChangeMask); + attr.event_mask = eventMask; const Window win = impl->win = XCreateWindow( display, xParent, |