From 206f036cef952f9fd36c59d5d547824eeaa8fee3 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 19 Jun 2013 13:52:02 +0100 Subject: [PATCH] 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. --- src/shell-global.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/shell-global.c b/src/shell-global.c index 1e0ea9c8c..d51433bce 100644 --- a/src/shell-global.c +++ b/src/shell-global.c @@ -1265,9 +1265,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