]> Pileus Git - ~andy/gtk/commitdiff
Avoid a warning under Wayland
authorMatthias Clasen <mclasen@redhat.com>
Sat, 9 Mar 2013 00:44:34 +0000 (19:44 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 9 Mar 2013 00:49:00 +0000 (19:49 -0500)
Just having an ifdef is not enough, we need to check the type
of the window at runtime.

gtk/gtkappchooseronlinepk.c

index 20ad1ffd4cdcd661f65b1048973b70c12c0be60c..5b70a5d75cd74efb62bab555b1eb742beca44322 100644 (file)
@@ -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;