summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--maximus/eggaccelerators.c3
-rw-r--r--maximus/eggaccelerators.h2
-rw-r--r--maximus/tomboykeybinder.c8
-rw-r--r--maximus/xutils.c11
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 ();