From a570493672c61eadd3f4355c303e57d3bc2973e3 Mon Sep 17 00:00:00 2001 From: Themaister Date: Sat, 15 Dec 2012 12:06:21 +0100 Subject: [PATCH] Grab key events in xvideo as well. --- gfx/xvideo.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gfx/xvideo.c b/gfx/xvideo.c index 9a6dc22bd4..6d6b9ea0bb 100644 --- a/gfx/xvideo.c +++ b/gfx/xvideo.c @@ -393,7 +393,7 @@ static void *xv_init(const video_info_t *video, const input_driver_t **input, vo xv->colormap = XCreateColormap(xv->display, DefaultRootWindow(xv->display), visualinfo->visual, AllocNone); attributes.colormap = xv->colormap; attributes.border_pixel = 0; - attributes.event_mask = StructureNotifyMask | DestroyNotify | ClientMessage; + attributes.event_mask = StructureNotifyMask | KeyPressMask | KeyReleaseMask | DestroyNotify | ClientMessage; width = video->fullscreen ? ((video->width == 0) ? geom->base_width : video->width) : video->width; height = video->fullscreen ? ((video->height == 0) ? geom->base_height : video->height) : video->height; @@ -715,6 +715,12 @@ static bool xv_alive(void *data) case UnmapNotify: xv->focus = false; break; + + case KeyPress: + case KeyRelease: + x11_handle_key_event(&event); + break; + default: break; }