[Spice-devel] [PATCH spice-gtk 2/3] Lower our gtk+ requirement to 2.18, as we claim

Marc-André Lureau marcandre.lureau at gmail.com
Thu Jan 12 05:54:59 PST 2012


Needed to build on RHEL6
---
 gtk/spice-widget.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 5ed2e10..1dd06f1 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -39,13 +39,15 @@
 #include "spice-gtk-session-priv.h"
 #include "vncdisplaykeymap.h"
 
+#include "glib-compat.h"
+
 /* Some compatibility defines to let us build on both Gtk2 and Gtk3 */
 #if GTK_CHECK_VERSION (2, 91, 0)
 
 static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh)
 {
-       *ww = gdk_window_get_width(w);
-       *wh = gdk_window_get_height(w);
+    *ww = gdk_window_get_width(w);
+    *wh = gdk_window_get_height(w);
 }
 
 #define GtkObject GtkWidget
@@ -54,6 +56,14 @@ static inline void gdk_drawable_get_size(GdkWindow *w, gint *ww, gint *wh)
 
 #endif
 
+#if !GTK_CHECK_VERSION(2, 20, 0)
+static gboolean gtk_widget_get_realized(GtkWidget *widget)
+{
+    g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
+    return GTK_WIDGET_REALIZED(widget);
+}
+#endif
+
 /**
  * SECTION:spice-widget
  * @short_description: a GTK display widget
-- 
1.7.7.5



More information about the Spice-devel mailing list