From 603410016070f8aa7df9546b89a9c6736b8494cd Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 28 Aug 2023 14:42:24 +0200 Subject: [PATCH] wayland/surface: Move a function So it's closer to where it's used. Part-of: --- src/wayland/meta-wayland-surface.c | 46 +++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 82f90b326..c9458e60c 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -1402,29 +1402,6 @@ set_surface_is_on_output (MetaWaylandSurface *surface, } } -static void -update_surface_output_state (gpointer key, gpointer value, gpointer user_data) -{ - MetaWaylandOutput *wayland_output = value; - MetaWaylandSurface *surface = user_data; - MetaLogicalMonitor *logical_monitor; - gboolean is_on_logical_monitor; - - g_assert (surface->role); - - logical_monitor = meta_wayland_output_get_logical_monitor (wayland_output); - if (!logical_monitor) - { - set_surface_is_on_output (surface, wayland_output, FALSE); - return; - } - - is_on_logical_monitor = - meta_wayland_surface_role_is_on_logical_monitor (surface->role, - logical_monitor); - set_surface_is_on_output (surface, wayland_output, is_on_logical_monitor); -} - static void surface_output_disconnect_signals (gpointer key, gpointer value, @@ -1463,6 +1440,29 @@ out: return scale; } +static void +update_surface_output_state (gpointer key, gpointer value, gpointer user_data) +{ + MetaWaylandOutput *wayland_output = value; + MetaWaylandSurface *surface = user_data; + MetaLogicalMonitor *logical_monitor; + gboolean is_on_logical_monitor; + + g_assert (surface->role); + + logical_monitor = meta_wayland_output_get_logical_monitor (wayland_output); + if (!logical_monitor) + { + set_surface_is_on_output (surface, wayland_output, FALSE); + return; + } + + is_on_logical_monitor = + meta_wayland_surface_role_is_on_logical_monitor (surface->role, + logical_monitor); + set_surface_is_on_output (surface, wayland_output, is_on_logical_monitor); +} + void meta_wayland_surface_update_outputs (MetaWaylandSurface *surface) {