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.
This commit is contained in:
Neil Roberts 2013-06-19 13:52:02 +01:00
parent e3be2237b8
commit 206f036cef

View File

@ -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