[mutter/wip/carlosg/check-shutdown-xwayland] wayland: Check the xwayland shutdown policy before listening for x11 windows



commit bb39204da31773d9c8c9a55f40692edb0896ce09
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Aug 7 18:30:58 2019 +0200

    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.

 src/wayland/meta-xwayland.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index 0f7ecb85a..791c07794 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -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


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