[totem] backend: Make X11-specific includes optional
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Make X11-specific includes optional
- Date: Sun, 15 Jul 2012 15:12:25 +0000 (UTC)
commit 326aafc48580ba3835ac5cacaa3fc9221602f6a2
Author: Bastien Nocera <hadess hadess net>
Date: Sun Jul 15 16:11:12 2012 +0100
backend: Make X11-specific includes optional
On the X11 windowing system actually being supported.
src/backend/bacon-video-widget.c | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 1bd9b9e..a328f45 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -76,13 +76,15 @@
#include <math.h>
/* gtk+/gnome */
-#include <gdk/gdkx.h>
#include <gtk/gtk.h>
-#include <gtk/gtkx.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <gdesktop-enums.h>
+#ifdef GDK_WINDOWING_X11
+#include <gtk/gtkx.h>
+#endif /* GDK_WINDOWING_X11 */
+
#include "totem-gst-helpers.h"
#include "totem-gst-pixbuf-helpers.h"
#include "bacon-video-widget.h"
@@ -325,6 +327,16 @@ GST_DEBUG_CATEGORY (_totem_gst_debug_cat);
typedef gchar * (* MsgToStrFunc) (GstMessage * msg);
+static gboolean
+is_gtk_plug (GtkWidget *toplevel)
+{
+#ifdef GDK_WINDOWING_X11
+ return GTK_IS_PLUG(toplevel);
+#else
+ return FALSE;
+#endif /* GDK_WINDOWING_X11 */
+}
+
static const gchar *
get_type_name (GType class_type, int type)
{
@@ -596,7 +608,7 @@ bacon_video_widget_realize (GtkWidget * widget)
toplevel = gtk_widget_get_toplevel (widget);
if (gtk_widget_is_toplevel (toplevel) &&
gtk_widget_get_parent (widget) != toplevel &&
- !GTK_IS_PLUG(toplevel))
+ !is_gtk_plug(toplevel))
gtk_window_set_geometry_hints (GTK_WINDOW (toplevel), widget, NULL, 0);
bacon_video_widget_gst_missing_plugins_setup (bvw);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]