Gtk3: Port eggsmclient-xsmp

master-1.22
infirit 2014-12-11 16:44:16 +01:00
parent 7612b1d8f1
commit 84fd17a0b5
1 changed files with 7 additions and 0 deletions

View File

@ -36,6 +36,9 @@
#include <X11/SM/SMlib.h> #include <X11/SM/SMlib.h>
#include <gdk/gdk.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_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)) #define EGG_SM_CLIENT_XSMP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_SM_CLIENT_XSMP, EggSMClientXSMP))
@ -374,7 +377,11 @@ sm_client_xsmp_startup (EggSMClient *client,
free (ret_client_id); free (ret_client_id);
gdk_threads_enter (); 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); gdk_set_sm_client_id (xsmp->client_id);
#endif
gdk_threads_leave (); gdk_threads_leave ();
g_debug ("Got client ID \"%s\"", xsmp->client_id); g_debug ("Got client ID \"%s\"", xsmp->client_id);