From 30fc7960617bb35c9b2a93bde8b4a2a37b7a1229 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sat, 15 Dec 2012 12:00:57 +0100 Subject: [PATCH] Grab Key events in X/EGL as well. --- gfx/context/xegl_ctx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gfx/context/xegl_ctx.c b/gfx/context/xegl_ctx.c index 582ce188c6..79135d07f5 100644 --- a/gfx/context/xegl_ctx.c +++ b/gfx/context/xegl_ctx.c @@ -115,6 +115,11 @@ static void gfx_ctx_check_window(bool *quit, case UnmapNotify: g_has_focus = false; break; + + case KeyPress: + case KeyRelease: + x11_handle_key_event(&event); + break; } } @@ -291,7 +296,7 @@ static bool gfx_ctx_set_video_mode( swa.colormap = g_cmap = XCreateColormap(g_dpy, RootWindow(g_dpy, vi->screen), vi->visual, AllocNone); - swa.event_mask = StructureNotifyMask; + swa.event_mask = StructureNotifyMask | KeyPressMask | KeyReleaseMask; swa.override_redirect = fullscreen ? True : False; if (fullscreen && !windowed_full)