[gnome-shell/wip/wayland: 20/25] wayland: Don't set properties on the overlay window on Wayland



commit b0ccf81fa774b3d8d271fcfeedf5c6de020abf14
Author: Neil Roberts <neil linux intel com>
Date:   Wed Jun 19 13:52:02 2013 +0100

    wayland: Don't set properties on the overlay window on Wayland
    
    When Mutter is running as a display server it won't create an overlay
    window. Therefore we shouldn't need to set the DND proxy on the
    window. This was previously causing X errors when it tried to set a
    property on an invalid window.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707467

 src/shell-global.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/shell-global.c b/src/shell-global.c
index 21ea3d8..a969bbe 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -1297,9 +1297,12 @@ void shell_global_init_xdnd (ShellGlobal *global)
                    gdk_x11_get_xatom_by_name ("XdndAware"), XA_ATOM,
                    32, PropModeReplace, (const unsigned char *)&xdnd_version, 1);
 
-  XChangeProperty (global->xdisplay, output_window,
-                   gdk_x11_get_xatom_by_name ("XdndProxy"), XA_WINDOW,
-                   32, PropModeReplace, (const unsigned char *)&global->stage_xwindow, 1);
+  /* There is no overlay window when running as a display server */
+  if (output_window)
+    XChangeProperty (global->xdisplay, output_window,
+                     gdk_x11_get_xatom_by_name ("XdndProxy"), XA_WINDOW,
+                     32, PropModeReplace,
+                     (const unsigned char *)&global->stage_xwindow, 1);
 
   /*
    * XdndProxy is additionally set on the proxy window as verification that the


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