[gtk+] window: Add check for X11 window when calling x11 function



commit 7693804fcf74cfacfde70987a1df164094e5e962
Author: Benjamin Otte <otte redhat com>
Date:   Wed Mar 2 17:29:21 2011 +0100

    window: Add check for X11 window when calling x11 function

 gtk/gtkwindow.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 98b5c86..c996362 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4978,9 +4978,12 @@ gtk_window_realize (GtkWidget *widget)
   if (priv->startup_id)
     {
 #ifdef GDK_WINDOWING_X11
-      guint32 timestamp = extract_time_from_startup_id (priv->startup_id);
-      if (timestamp != GDK_CURRENT_TIME)
-	gdk_x11_window_set_user_time (gdk_window, timestamp);
+      if (GDK_IS_X11_WINDOW (gdk_window))
+        {
+          guint32 timestamp = extract_time_from_startup_id (priv->startup_id);
+          if (timestamp != GDK_CURRENT_TIME)
+            gdk_x11_window_set_user_time (gdk_window, timestamp);
+        }
 #endif
       if (!startup_id_is_fake (priv->startup_id)) 
 	gdk_window_set_startup_id (gdk_window, priv->startup_id);



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