diff options
author | Stefano Karapetsas <[email protected]> | 2014-01-15 17:03:00 +0100 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2014-01-15 17:03:00 +0100 |
commit | 250aa6b573bc495efe96dad816267daf65182a3c (patch) | |
tree | fb28bc23edf9161ee1c4d22d8e706f15d30d7ef5 /maximus | |
parent | 9d05ecd2763d64ee679e5ba350a1e5b70beb14b8 (diff) | |
download | mate-netbook-250aa6b573bc495efe96dad816267daf65182a3c.tar.bz2 mate-netbook-250aa6b573bc495efe96dad816267daf65182a3c.tar.xz |
maximus: Add GTK3 support
Diffstat (limited to 'maximus')
-rw-r--r-- | maximus/eggaccelerators.c | 3 | ||||
-rw-r--r-- | maximus/eggaccelerators.h | 2 | ||||
-rw-r--r-- | maximus/tomboykeybinder.c | 8 | ||||
-rw-r--r-- | maximus/xutils.c | 11 |
4 files changed, 20 insertions, 4 deletions
diff --git a/maximus/eggaccelerators.c b/maximus/eggaccelerators.c index 5410259..d914811 100644 --- a/maximus/eggaccelerators.c +++ b/maximus/eggaccelerators.c @@ -22,6 +22,9 @@ #include <string.h> #include <gdk/gdkx.h> #include <gdk/gdkkeysyms.h> +#if GTK_CHECK_VERSION (3, 0, 0) +#include <gdk/gdkkeysyms-compat.h> +#endif enum { diff --git a/maximus/eggaccelerators.h b/maximus/eggaccelerators.h index 18e3ae0..282f146 100644 --- a/maximus/eggaccelerators.h +++ b/maximus/eggaccelerators.h @@ -20,7 +20,7 @@ #ifndef __EGG_ACCELERATORS_H__ #define __EGG_ACCELERATORS_H__ -#include <gtk/gtkaccelgroup.h> +#include <gtk/gtk.h> #include <gdk/gdk.h> G_BEGIN_DECLS 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; diff --git a/maximus/xutils.c b/maximus/xutils.c index 3ff03bb..b082ced 100644 --- a/maximus/xutils.c +++ b/maximus/xutils.c @@ -43,7 +43,11 @@ _wnck_error_trap_push (void) int _wnck_error_trap_pop (void) { +#if GTK_CHECK_VERSION (3, 0, 0) + XSync (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), False); +#else XSync (gdk_display, False); +#endif return gdk_error_trap_pop (); } @@ -78,7 +82,12 @@ _wnck_get_wmclass (Window xwindow, ch.res_name = NULL; ch.res_class = NULL; - XGetClassHint (gdk_display, xwindow, +#if GTK_CHECK_VERSION (3, 0, 0) + XGetClassHint (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), +#else + XGetClassHint (gdk_display, +#endif + xwindow, &ch); _wnck_error_trap_pop (); |