wayland: Check the xwayland shutdown policy before listening for x11 windows

We only listen for those so we know there's no more X11 clients that we
should keep the Xwayland server alive for. Check first that we really did
request Xwayland to be handled on demand for this, otherwise the check is
superfluous, even harmful.

https://gitlab.gnome.org/GNOME/mutter/issues/719
This commit is contained in:
Carlos Garnacho 2019-08-07 18:30:58 +02:00
parent 7ab07b05e9
commit 80c8a287ee

View File

@ -797,8 +797,11 @@ meta_xwayland_complete_init (MetaDisplay *display)
G_CALLBACK (on_x11_display_closing), NULL);
meta_xwayland_init_dnd ();
g_signal_connect (meta_get_display (), "window-created",
G_CALLBACK (window_created_cb), manager);
if (meta_get_x11_display_policy () == META_DISPLAY_POLICY_ON_DEMAND)
{
g_signal_connect (meta_get_display (), "window-created",
G_CALLBACK (window_created_cb), manager);
}
}
void