From a8b56a115d2f456d56971a21e98b91e847627f5b Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Sat, 26 Oct 2013 11:57:56 +0200 Subject: Add GTK3 support to gnome keyring module --- mate-session/msm-gnome.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 #include +#include #include #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; } -- cgit v1.2.1