mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
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:
parent
d03c194552
commit
dc97163bcd
@ -558,6 +558,7 @@ meta_wayland_compositor_setup (MetaWaylandCompositor *compositor)
|
||||
g_autoptr (GError) error = NULL;
|
||||
|
||||
if (!meta_xwayland_init (&compositor->xwayland_manager,
|
||||
compositor,
|
||||
compositor->wayland_display,
|
||||
&error))
|
||||
g_error ("Failed to start X Wayland: %s", error->message);
|
||||
|
@ -25,9 +25,10 @@
|
||||
#include "wayland/meta-wayland-private.h"
|
||||
|
||||
gboolean
|
||||
meta_xwayland_init (MetaXWaylandManager *manager,
|
||||
struct wl_display *display,
|
||||
GError **error);
|
||||
meta_xwayland_init (MetaXWaylandManager *manager,
|
||||
MetaWaylandCompositor *compositor,
|
||||
struct wl_display *display,
|
||||
GError **error);
|
||||
|
||||
void
|
||||
meta_xwayland_complete_init (MetaDisplay *display,
|
||||
|
@ -568,6 +568,7 @@ xserver_died (GObject *source,
|
||||
meta_display_shutdown_x11 (display);
|
||||
|
||||
if (!meta_xwayland_init (&compositor->xwayland_manager,
|
||||
compositor,
|
||||
compositor->wayland_display,
|
||||
&error))
|
||||
g_warning ("Failed to init X sockets: %s", error->message);
|
||||
@ -1137,9 +1138,10 @@ meta_xwayland_stop_xserver (MetaXWaylandManager *manager)
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_xwayland_init (MetaXWaylandManager *manager,
|
||||
struct wl_display *wl_display,
|
||||
GError **error)
|
||||
meta_xwayland_init (MetaXWaylandManager *manager,
|
||||
MetaWaylandCompositor *compositor,
|
||||
struct wl_display *wl_display,
|
||||
GError **error)
|
||||
{
|
||||
MetaX11DisplayPolicy policy;
|
||||
int display = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user