[mutter/wayland] xwayland: Split another part of the initialization sequence out



commit eb5b54dd8b173f904f29c98deadd3c79e297712f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Apr 2 10:22:01 2014 -0400

    xwayland: Split another part of the initialization sequence out
    
    This will be used from a SIGUSR1 handler.

 src/wayland/meta-xwayland.c |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index ada9c26..72be352 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -38,6 +38,9 @@
 #include "xserver-server-protocol.h"
 
 static void
+xserver_finished_init (MetaXWaylandManager *manager);
+
+static void
 associate_window_with_surface (MetaWindow         *window,
                                MetaWaylandSurface *surface)
 {
@@ -104,12 +107,7 @@ bind_xserver (struct wl_client *client,
    * manager. */
   wl_client_flush (client);
 
-  /* At this point xwayland is all setup to start accepting
-   * connections so we can quit the transient initialization mainloop
-   * and unblock meta_wayland_init() to continue initializing mutter.
-   * */
-  g_main_loop_quit (manager->init_loop);
-  g_clear_pointer (&manager->init_loop, g_main_loop_unref);
+  xserver_finished_init (manager);
 }
 
 static char *
@@ -337,6 +335,17 @@ choose_xdisplay (MetaXWaylandManager *manager)
   return TRUE;
 }
 
+static void
+xserver_finished_init (MetaXWaylandManager *manager)
+{
+  /* At this point xwayland is all setup to start accepting
+   * connections so we can quit the transient initialization mainloop
+   * and unblock meta_wayland_init() to continue initializing mutter.
+   * */
+  g_main_loop_quit (manager->init_loop);
+  g_clear_pointer (&manager->init_loop, g_main_loop_unref);
+}
+
 gboolean
 meta_xwayland_start (MetaXWaylandManager *manager,
                      struct wl_display   *wl_display)


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