[mutter] wayland/output: Use the passed compositor pointer



commit d03c194552177e050169065419c77a779af4c504
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu May 6 18:48:15 2021 +0200

    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>

 src/wayland/meta-wayland-outputs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/wayland/meta-wayland-outputs.c b/src/wayland/meta-wayland-outputs.c
index 9a1b833fb3..6c766ea514 100644
--- a/src/wayland/meta-wayland-outputs.c
+++ b/src/wayland/meta-wayland-outputs.c
@@ -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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]