[gtk+] Avoid a warning under Wayland



commit 1f8286004f1bdab91c16c59354b4f036260514bd
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Mar 8 19:44:34 2013 -0500

    Avoid a warning under Wayland
    
    Just having an ifdef is not enough, we need to check the type
    of the window at runtime.

 gtk/gtkappchooseronlinepk.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkappchooseronlinepk.c b/gtk/gtkappchooseronlinepk.c
index 20ad1ff..5b70a5d 100644
--- a/gtk/gtkappchooseronlinepk.c
+++ b/gtk/gtkappchooseronlinepk.c
@@ -138,7 +138,8 @@ pk_search_mime_async (GtkAppChooserOnline *obj,
 
 #ifdef GDK_WINDOWING_X11
   window = gtk_widget_get_window (GTK_WIDGET (parent));
-  xid = GDK_WINDOW_XID (window);
+  if (GDK_IS_X11_WINDOW (window))
+    xid = GDK_WINDOW_XID (window);
 #endif
 
   mime_types[0] = content_type;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]