mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
wayland/compositor: Pass backend when constructing
This is so that it can be retrieved later without going via the global singleton. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1218
This commit is contained in:
parent
1571f8078a
commit
e8b09df8d2
@ -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
|
||||
|
@ -74,6 +74,8 @@ struct _MetaWaylandCompositor
|
||||
{
|
||||
GObject parent;
|
||||
|
||||
MetaBackend *backend;
|
||||
|
||||
struct wl_display *wayland_display;
|
||||
char *display_name;
|
||||
GHashTable *outputs;
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user