diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c index d6892f5bb..f57a78580 100644 --- a/src/backends/meta-backend.c +++ b/src/backends/meta-backend.c @@ -886,7 +886,7 @@ meta_backend_init_wayland_display (MetaBackend *backend) { MetaBackendPrivate *priv = meta_backend_get_instance_private (backend); - priv->wayland_compositor = meta_wayland_compositor_new (); + priv->wayland_compositor = meta_wayland_compositor_new (backend); } void diff --git a/src/wayland/meta-wayland-private.h b/src/wayland/meta-wayland-private.h index e28ca06d6..a7e5604fc 100644 --- a/src/wayland/meta-wayland-private.h +++ b/src/wayland/meta-wayland-private.h @@ -74,6 +74,8 @@ struct _MetaWaylandCompositor { GObject parent; + MetaBackend *backend; + struct wl_display *wayland_display; char *display_name; GHashTable *outputs; diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c index a7bf9158c..b37d9fdcf 100644 --- a/src/wayland/meta-wayland.c +++ b/src/wayland/meta-wayland.c @@ -362,9 +362,14 @@ meta_wayland_get_xwayland_auth_file (MetaWaylandCompositor *compositor) } MetaWaylandCompositor * -meta_wayland_compositor_new (void) +meta_wayland_compositor_new (MetaBackend *backend) { - return g_object_new (META_TYPE_WAYLAND_COMPOSITOR, NULL); + MetaWaylandCompositor *compositor; + + compositor = g_object_new (META_TYPE_WAYLAND_COMPOSITOR, NULL); + compositor->backend = backend; + + return compositor; } void diff --git a/src/wayland/meta-wayland.h b/src/wayland/meta-wayland.h index 15b7310ba..4164563e8 100644 --- a/src/wayland/meta-wayland.h +++ b/src/wayland/meta-wayland.h @@ -37,7 +37,7 @@ void meta_wayland_init (void); void meta_wayland_finalize (void); -MetaWaylandCompositor * meta_wayland_compositor_new (void); +MetaWaylandCompositor * meta_wayland_compositor_new (MetaBackend *backend); void meta_wayland_compositor_setup (MetaWaylandCompositor *compositor);