summaryrefslogtreecommitdiff
path: root/maximus/tomboykeybinder.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2014-01-15 17:03:00 +0100
committerStefano Karapetsas <[email protected]>2014-01-15 17:03:00 +0100
commit250aa6b573bc495efe96dad816267daf65182a3c (patch)
treefb28bc23edf9161ee1c4d22d8e706f15d30d7ef5 /maximus/tomboykeybinder.c
parent9d05ecd2763d64ee679e5ba350a1e5b70beb14b8 (diff)
downloadmate-netbook-250aa6b573bc495efe96dad816267daf65182a3c.tar.bz2
mate-netbook-250aa6b573bc495efe96dad816267daf65182a3c.tar.xz
maximus: Add GTK3 support
Diffstat (limited to 'maximus/tomboykeybinder.c')
-rw-r--r--maximus/tomboykeybinder.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/maximus/tomboykeybinder.c b/maximus/tomboykeybinder.c
index 0c50cc0..e84a586 100644
--- a/maximus/tomboykeybinder.c
+++ b/maximus/tomboykeybinder.c
@@ -86,7 +86,7 @@ grab_ungrab_with_ignorable_modifiers (GdkWindow *rootwin,
XGrabKey (GDK_WINDOW_XDISPLAY (rootwin),
binding->keycode,
binding->modifiers | mod_masks [i],
- GDK_WINDOW_XWINDOW (rootwin),
+ GDK_WINDOW_XID (rootwin),
False,
GrabModeAsync,
GrabModeAsync);
@@ -94,7 +94,7 @@ grab_ungrab_with_ignorable_modifiers (GdkWindow *rootwin,
XUngrabKey (GDK_WINDOW_XDISPLAY (rootwin),
binding->keycode,
binding->modifiers | mod_masks [i],
- GDK_WINDOW_XWINDOW (rootwin));
+ GDK_WINDOW_XID (rootwin));
}
}
}
@@ -309,7 +309,11 @@ tomboy_keybinder_is_modifier (guint keycode)
XModifierKeymap *mod_keymap;
gboolean retval = FALSE;
+#if GTK_CHECK_VERSION (3, 0, 0)
+ mod_keymap = XGetModifierMapping (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
+#else
mod_keymap = XGetModifierMapping (gdk_display);
+#endif
map_size = 8 * mod_keymap->max_keypermod;