wayland: Initialize in a single step

Before we first created the MetaWaylandCompositor instance, which would
repare Clutter/Cogl so they could initialize and turn on Wayland display
server features, then later to initialize the rest. Now that part is
done by the Wayland infrastructure itself, so we don't need the early
initialization. Simplify things a bit by centralizing it all into a
single meta_wayland_compositor_new() call.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
This commit is contained in:
Jonas Ådahl
2021-05-06 16:02:34 +02:00
parent 0330ce1f15
commit d3b7d8df0d
3 changed files with 10 additions and 21 deletions

View File

@ -317,10 +317,6 @@ meta_context_setup (MetaContext *context,
init_introspection (context);
#ifdef HAVE_WAYLAND
priv->wayland_compositor = meta_wayland_compositor_new (context);
#endif
return META_CONTEXT_GET_CLASS (context)->setup (context, error);
}
@ -335,7 +331,7 @@ meta_context_start (MetaContext *context,
#ifdef HAVE_WAYLAND
if (meta_context_get_compositor_type (context) ==
META_COMPOSITOR_TYPE_WAYLAND)
meta_wayland_compositor_setup (priv->wayland_compositor);
priv->wayland_compositor = meta_wayland_compositor_new (context);
#endif
priv->display = meta_display_new (context, error);