xwayland: Pass MetaWaylandCompositor pointer when initializing
This way we can initialize without having any way to retrieve it via some global variable. This isn't needed now, but will be once Wayland infrastructure initializiation is done in a single step. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1863>
This commit is contained in:
@ -558,6 +558,7 @@ meta_wayland_compositor_setup (MetaWaylandCompositor *compositor)
|
|||||||
g_autoptr (GError) error = NULL;
|
g_autoptr (GError) error = NULL;
|
||||||
|
|
||||||
if (!meta_xwayland_init (&compositor->xwayland_manager,
|
if (!meta_xwayland_init (&compositor->xwayland_manager,
|
||||||
|
compositor,
|
||||||
compositor->wayland_display,
|
compositor->wayland_display,
|
||||||
&error))
|
&error))
|
||||||
g_error ("Failed to start X Wayland: %s", error->message);
|
g_error ("Failed to start X Wayland: %s", error->message);
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_xwayland_init (MetaXWaylandManager *manager,
|
meta_xwayland_init (MetaXWaylandManager *manager,
|
||||||
|
MetaWaylandCompositor *compositor,
|
||||||
struct wl_display *display,
|
struct wl_display *display,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
@ -568,6 +568,7 @@ xserver_died (GObject *source,
|
|||||||
meta_display_shutdown_x11 (display);
|
meta_display_shutdown_x11 (display);
|
||||||
|
|
||||||
if (!meta_xwayland_init (&compositor->xwayland_manager,
|
if (!meta_xwayland_init (&compositor->xwayland_manager,
|
||||||
|
compositor,
|
||||||
compositor->wayland_display,
|
compositor->wayland_display,
|
||||||
&error))
|
&error))
|
||||||
g_warning ("Failed to init X sockets: %s", error->message);
|
g_warning ("Failed to init X sockets: %s", error->message);
|
||||||
@ -1138,6 +1139,7 @@ meta_xwayland_stop_xserver (MetaXWaylandManager *manager)
|
|||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
meta_xwayland_init (MetaXWaylandManager *manager,
|
meta_xwayland_init (MetaXWaylandManager *manager,
|
||||||
|
MetaWaylandCompositor *compositor,
|
||||||
struct wl_display *wl_display,
|
struct wl_display *wl_display,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user