[mutter/gnome-3-18] wayland: bind wayland socket after xwayland is initialized



commit 2ea121a1869d21ef0726aca27abd02a3245d1d74
Author: Marek Chalupa <mchqwerty gmail com>
Date:   Thu Jul 2 10:41:37 2015 +0200

    wayland: bind wayland socket after xwayland is initialized
    
    During xwayland initialization we run main loop and dispatch wayland
    events, so that xwayland can initialize. If some client during this
    phase connects and creates surface, mutter crashes because
    it is not initialized yet. If we bind wayland socket after xwayland
    is initialized and main loop is not running anymore, no client can
    connect to mutter during initialization and that is what we want.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=751845

 src/wayland/meta-wayland.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index 0d37489..d51e8b5 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -337,13 +337,13 @@ meta_wayland_init (void)
   meta_wayland_pointer_gestures_init (compositor);
   meta_wayland_seat_init (compositor);
 
+  if (!meta_xwayland_start (&compositor->xwayland_manager, compositor->wayland_display))
+    g_error ("Failed to start X Wayland");
+
   compositor->display_name = wl_display_add_socket_auto (compositor->wayland_display);
   if (compositor->display_name == NULL)
     g_error ("Failed to create socket");
 
-  if (!meta_xwayland_start (&compositor->xwayland_manager, compositor->wayland_display))
-    g_error ("Failed to start X Wayland");
-
   set_gnome_env ("DISPLAY", meta_wayland_get_xwayland_display_name (compositor));
   set_gnome_env ("WAYLAND_DISPLAY", meta_wayland_get_wayland_display_name (compositor));
 }


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