Grab Key events in X/EGL as well.

This commit is contained in:
Themaister 2012-12-15 12:00:57 +01:00
parent 6013a324c8
commit 30fc796061

View File

@ -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)