wayland/surface: Move a function
So it's closer to where it's used. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3217>
This commit is contained in:
parent
feec896d85
commit
6034100160
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user