wayland/output: Use the passed compositor pointer

This is especially important as we might end up here when initializing
the Wayland infrastructure. Later that will be done in one step, meaning
the "get_default()" function will not work properly.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1863>
This commit is contained in:
Jonas Ådahl 2021-05-06 18:48:15 +02:00 committed by Marge Bot
parent 5bc8823701
commit d03c194552

View File

@ -416,8 +416,6 @@ static MetaWaylandOutput *
meta_wayland_output_new (MetaWaylandCompositor *compositor,
MetaLogicalMonitor *logical_monitor)
{
MetaWaylandCompositor *wayland_compositor =
meta_wayland_compositor_get_default ();
MetaWaylandOutput *wayland_output;
wayland_output = g_object_new (META_TYPE_WAYLAND_OUTPUT, NULL);
@ -425,7 +423,7 @@ meta_wayland_output_new (MetaWaylandCompositor *compositor,
&wl_output_interface,
META_WL_OUTPUT_VERSION,
wayland_output, bind_output);
meta_wayland_compositor_flush_clients (wayland_compositor);
meta_wayland_compositor_flush_clients (compositor);
meta_wayland_output_set_logical_monitor (wayland_output, logical_monitor);
return wayland_output;