[epiphany] egg: cherry-pick fixes for compilation against GTK+ 2.91.7
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] egg: cherry-pick fixes for compilation against GTK+ 2.91.7
- Date: Thu, 23 Dec 2010 12:45:34 +0000 (UTC)
commit f3c2e279e2627b405947a785375e733195f5f7a1
Author: Xan Lopez <xan gnome org>
Date: Thu Dec 23 13:32:01 2010 +0100
egg: cherry-pick fixes for compilation against GTK+ 2.91.7
lib/egg/eggsmclient-private.h | 6 ++++++
lib/egg/eggsmclient-xsmp.c | 6 ++++--
2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/lib/egg/eggsmclient-private.h b/lib/egg/eggsmclient-private.h
index ccb10bf..0c98eee 100644
--- a/lib/egg/eggsmclient-private.h
+++ b/lib/egg/eggsmclient-private.h
@@ -20,7 +20,13 @@
#ifndef __EGG_SM_CLIENT_PRIVATE_H__
#define __EGG_SM_CLIENT_PRIVATE_H__
+#include <gtk/gtk.h>
+
+#if !GTK_CHECK_VERSION(2,91,7) && !GTK_CHECK_VERSION(3,0,0)
+/* GTK+ 3 includes this automatically */
#include <gdkconfig.h>
+#endif
+
#include "eggsmclient.h"
G_BEGIN_DECLS
diff --git a/lib/egg/eggsmclient-xsmp.c b/lib/egg/eggsmclient-xsmp.c
index 81af7d2..96b2c12 100644
--- a/lib/egg/eggsmclient-xsmp.c
+++ b/lib/egg/eggsmclient-xsmp.c
@@ -35,8 +35,6 @@
#include <unistd.h>
#include <X11/SM/SMlib.h>
-#include <gdk/gdk.h>
-
#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_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_SM_CLIENT_XSMP, EggSMClientXSMPClass))
@@ -373,7 +371,11 @@ sm_client_xsmp_startup (EggSMClient *client,
free (ret_client_id);
gdk_threads_enter ();
+#if !GTK_CHECK_VERSION(2,91,7) && !GTK_CHECK_VERSION(3,0,0)
gdk_set_sm_client_id (xsmp->client_id);
+#else
+ gdk_x11_set_sm_client_id (xsmp->client_id);
+#endif
gdk_threads_leave ();
g_debug ("Got client ID \"%s\"", xsmp->client_id);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]