summaryrefslogtreecommitdiff
path: root/cut-n-paste-code/libegg/eggsmclient-xsmp.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-07-25 15:11:46 +0200
committerStefano Karapetsas <[email protected]>2013-07-25 15:11:46 +0200
commita706a5994f0b704a3016416983dccce536ebe5f5 (patch)
tree29739bcce2e4dcb2fe032e58d5a7ec441843e51f /cut-n-paste-code/libegg/eggsmclient-xsmp.c
parenta59fad1c5f8e2d5660b481d3e7849f6b3c5a8226 (diff)
downloadcaja-a706a5994f0b704a3016416983dccce536ebe5f5.tar.bz2
caja-a706a5994f0b704a3016416983dccce536ebe5f5.tar.xz
cut-n-paste-code: Add GTK3 support
Diffstat (limited to 'cut-n-paste-code/libegg/eggsmclient-xsmp.c')
-rw-r--r--cut-n-paste-code/libegg/eggsmclient-xsmp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cut-n-paste-code/libegg/eggsmclient-xsmp.c b/cut-n-paste-code/libegg/eggsmclient-xsmp.c
index f6aae232..454ccaf1 100644
--- a/cut-n-paste-code/libegg/eggsmclient-xsmp.c
+++ b/cut-n-paste-code/libegg/eggsmclient-xsmp.c
@@ -35,7 +35,11 @@
#include <unistd.h>
#include <X11/SM/SMlib.h>
+#include <gtk/gtk.h>
#include <gdk/gdk.h>
+#if GTK_CHECK_VERSION (3, 0, 0)
+#include <gdk/gdkx.h>
+#endif
#define EGG_TYPE_SM_CLIENT_XSMP (egg_sm_client_xsmp_get_type ())
#define EGG_SM_CLIENT_XSMP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_SM_CLIENT_XSMP, EggSMClientXSMP))
@@ -368,7 +372,11 @@ sm_client_xsmp_startup (EggSMClient *client,
free (ret_client_id);
gdk_threads_enter ();
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_x11_set_sm_client_id (xsmp->client_id);
+#else
gdk_set_sm_client_id (xsmp->client_id);
+#endif
gdk_threads_leave ();
g_debug ("Got client ID \"%s\"", xsmp->client_id);