xwayland: Split another part of the initialization sequence out

This will be used from a SIGUSR1 handler.
This commit is contained in:
Jasper St. Pierre 2014-04-02 10:22:01 -04:00
parent 9653b79a35
commit eb5b54dd8b

View File

@ -37,6 +37,9 @@
#include "meta-window-actor-private.h"
#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)