summaryrefslogtreecommitdiff
path: root/mate-session
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-10-26 11:57:56 +0200
committerStefano Karapetsas <[email protected]>2013-10-26 11:57:56 +0200
commita8b56a115d2f456d56971a21e98b91e847627f5b (patch)
treef2677bce371d7d3eb5c90c789cb8e53dacff5799 /mate-session
parent8a20baf39f781184d6126e0947e9fd4d9a115fab (diff)
downloadmate-session-manager-a8b56a115d2f456d56971a21e98b91e847627f5b.tar.bz2
mate-session-manager-a8b56a115d2f456d56971a21e98b91e847627f5b.tar.xz
Add GTK3 support to gnome keyring module
Diffstat (limited to 'mate-session')
-rw-r--r--mate-session/msm-gnome.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mate-session/msm-gnome.c b/mate-session/msm-gnome.c
index 1043a35..e59ac4e 100644
--- a/mate-session/msm-gnome.c
+++ b/mate-session/msm-gnome.c
@@ -35,6 +35,7 @@
#include <X11/Xatom.h>
#include <X11/Xlib.h>
+#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#include "msm-gnome.h"
@@ -174,7 +175,11 @@ msm_compat_gnome_smproxy_startup (void)
* This has another advantage, since it prevents people from running
* gnome-smproxy in xfce4, which would cause trouble otherwise.
*/
+#if GTK_CHECK_VERSION (3, 0, 0)
+ dpy = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
+#else
dpy = gdk_display;
+#endif
root = RootWindow (dpy, 0);
if (gnome_smproxy_window != None)
@@ -203,8 +208,13 @@ msm_compat_gnome_smproxy_shutdown (void)
if (gnome_smproxy_window != None)
{
+#if GTK_CHECK_VERSION (3, 0, 0)
+ XDestroyWindow (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), gnome_smproxy_window);
+ XSync (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), False);
+#else
XDestroyWindow (gdk_display, gnome_smproxy_window);
XSync (gdk_display, False);
+#endif
gnome_smproxy_window = None;
}