[gtk+/client-side-windows: 7/284] Really create a native window when getting xid



commit d326a638fb9d15a598de135c7923d29a040c7aba
Author: Alexander Larsson <alexl redhat com>
Date:   Wed Dec 3 11:55:17 2008 +0100

    Really create a native window when getting xid
---
 gdk/x11/gdkdrawable-x11.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c
index 8203f06..5c4abce 100644
--- a/gdk/x11/gdkdrawable-x11.c
+++ b/gdk/x11/gdkdrawable-x11.c
@@ -871,17 +871,19 @@ gdk_x11_drawable_get_xid (GdkDrawable *drawable)
   
   if (GDK_IS_WINDOW (drawable))
     {
+      GdkWindow *window = (GdkWindow *)drawable;
+      
       /* Try to ensure the window has a native window */
-      if (!GDK_WINDOW_IS_X11 (drawable))
-	gdk_window_set_has_native ((GdkWindow *)drawable, TRUE);
+      if (!_gdk_window_has_impl (window))
+	gdk_window_set_has_native (window, TRUE);
       
-      if (!GDK_WINDOW_IS_X11 (drawable))
+      if (!GDK_WINDOW_IS_X11 (window))
         {
           g_warning (G_STRLOC " drawable is not a native X11 window");
           return None;
         }
 
-      impl = ((GdkPixmapObject *)drawable)->impl;
+      impl = ((GdkWindowObject *)drawable)->impl;
     }
   else if (GDK_IS_PIXMAP (drawable))
     impl = ((GdkPixmapObject *)drawable)->impl;



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