summaryrefslogtreecommitdiff
path: root/src/core/display.c
diff options
context:
space:
mode:
authorDenis Gorodnichev <[email protected]>2014-07-24 10:37:41 +0400
committerinfirit <[email protected]>2014-11-25 18:06:24 +0100
commitb25395fab6fe9ee38bc0cd359941d0a825d88451 (patch)
treee7b6720a543a00495fae1dd1423d652056bedb03 /src/core/display.c
parentb8d8e52f0effbf76ff909f88932098d4daf4336e (diff)
downloadmarco-b25395fab6fe9ee38bc0cd359941d0a825d88451.tar.bz2
marco-b25395fab6fe9ee38bc0cd359941d0a825d88451.tar.xz
merge metacity(gtk3) changes
merge metacity(gtk3) changes fix warnings clean up unused variables replace UNUSED_VARIABLE by G_GNUC_UNUSED
Diffstat (limited to 'src/core/display.c')
-rw-r--r--src/core/display.c21
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