[gtk+/client-side-windows: 5/284] Create native window when requesting xid



commit 8fc7a9547c833642fca519395cf3e926f81d5010
Author: Alexander Larsson <alexl redhat com>
Date:   Wed Dec 3 11:18:09 2008 +0100

    Create native window when requesting xid
---
 gdk/x11/gdkdrawable-x11.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c
index 1c40568..8203f06 100644
--- a/gdk/x11/gdkdrawable-x11.c
+++ b/gdk/x11/gdkdrawable-x11.c
@@ -871,10 +871,12 @@ gdk_x11_drawable_get_xid (GdkDrawable *drawable)
   
   if (GDK_IS_WINDOW (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_IS_X11 (drawable))
         {
-	  /* TODO: At this point we could convert a virtual window
-	     to a native one (unless its in an offscreen window) */
           g_warning (G_STRLOC " drawable is not a native X11 window");
           return None;
         }



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