diff options
Diffstat (limited to 'src/core/display.c')
-rw-r--r-- | src/core/display.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/core/display.c b/src/core/display.c index 8a81d8f4..6a4831fb 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -1482,6 +1482,15 @@ static gboolean maybe_send_event_to_gtk(MetaDisplay* display, XEvent* xevent) return FALSE; } +#if GTK_CHECK_VERSION (3, 0, 0) + if (gdk_display_device_is_grabbed(gdk_display, device)) +#else + if (gdk_display_pointer_is_grabbed(gdk_display)) +#endif + { + return FALSE; + } + switch (xevent->type) { @@ -2843,9 +2852,15 @@ key_event_description (Display *xdisplay, XEvent *event) { #ifdef HAVE_XKB - KeySym keysym = XkbKeycodeToKeysym(xdisplay, event->xkey.keycode, 0, 0); - const char *str = XKeysymToString (keysym); - return g_strdup_printf ("Key '%s' state 0x%x", str ? str : "none", event->xkey.state); + KeySym keysym; + const char *str; + + keysym = XkbKeycodeToKeysym (xdisplay, event->xkey.keycode, 0, 0); + + str = XKeysymToString (keysym); + + return g_strdup_printf ("Key '%s' state 0x%x", + str ? str : "none", event->xkey.state); #else return "none"; #endif |