From dd17868b8943e2205c5933c0e3fb53a2e327fade Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 25 Dec 2019 22:39:10 +0100 Subject: [PATCH] source/Platform/Unix/X11Display.cpp: in create() set the attr.event_mask to include some interesting events. --- source/Platform/Unix/X11Display.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/Platform/Unix/X11Display.cpp b/source/Platform/Unix/X11Display.cpp index 92f2bfb..fc6f700 100644 --- a/source/Platform/Unix/X11Display.cpp +++ b/source/Platform/Unix/X11Display.cpp @@ -32,7 +32,10 @@ bool X11Display::create(DisplayDescription description) attr.background_pixel = WhitePixel(m_disp, m_screen); //attr.override_redirect = True; attr.colormap = ::XCreateColormap(m_disp, RootWindow(m_disp, m_screen), DefaultVisual(m_disp, m_screen), AllocNone); - attr.event_mask = ExposureMask; + // We want Keyboard,Mouse,Resize,Exposure (repaint) events. + attr.event_mask = KeyPressMask | KeyReleaseMask + | ButtonPressMask | ButtonReleaseMask | PointerMotionMask + | ResizeRedirectMask | ExposureMask; m_win = XCreateWindow(m_disp, RootWindow(m_disp, m_screen),