diff options
author | Stefano Karapetsas <[email protected]> | 2014-01-24 16:17:17 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-01-24 16:17:17 +0100 |
commit | 1893a77af55cd2e87e4e249193a9203b1a7a0c69 (patch) | |
tree | 33996864ed575f1d4615b3872cb39575bd62c18e /capplets/keybindings/eggcellrendererkeys.c | |
parent | 6e619aedc2e6a105d5849519ae50e9d2b1145c88 (diff) | |
download | mate-control-center-1893a77af55cd2e87e4e249193a9203b1a7a0c69.tar.bz2 mate-control-center-1893a77af55cd2e87e4e249193a9203b1a7a0c69.tar.xz |
keybindings: Add GTK3 support
Diffstat (limited to 'capplets/keybindings/eggcellrendererkeys.c')
-rw-r--r-- | capplets/keybindings/eggcellrendererkeys.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/capplets/keybindings/eggcellrendererkeys.c b/capplets/keybindings/eggcellrendererkeys.c index 5d84c2de..9dffeda7 100644 --- a/capplets/keybindings/eggcellrendererkeys.c +++ b/capplets/keybindings/eggcellrendererkeys.c @@ -3,6 +3,9 @@ #include <gtk/gtk.h> #include <gdk/gdkx.h> #include <gdk/gdkkeysyms.h> +#if GTK_CHECK_VERSION (3, 0, 0) +#include <gdk/gdkkeysyms-compat.h> +#endif #include "eggcellrendererkeys.h" #include "eggaccelerators.h" @@ -317,7 +320,11 @@ static gboolean is_modifier(guint keycode) XModifierKeymap* mod_keymap; gboolean retval = FALSE; +#if GTK_CHECK_VERSION (3, 0, 0) + mod_keymap = XGetModifierMapping(gdk_x11_display_get_xdisplay(gdk_display_get_default())); +#else mod_keymap = XGetModifierMapping(gdk_display); +#endif map_size = 8 * mod_keymap->max_keypermod; i = 0; |