wayland/surface: Don't update outputs recursively on mapped changes

There's no need to update the outputs recursively in case the actor gets
mapped or unmapped. That's because mapping happens recursively itself,
so if a window with multiple subsurfaces is shown, all subsurfaces will
receive a "notify::mapped" signal.

Since this was the only remaining user of
meta_wayland_surface_update_outputs_recursively(), we can now remove
that function.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1358
This commit is contained in:
Jonas Dreßler 2020-07-07 16:49:31 +02:00 committed by Robert Mader
parent 35f847ac6d
commit 0b9a71ea3c
3 changed files with 1 additions and 17 deletions

View File

@ -73,9 +73,6 @@ clear_surface_actor (MetaWaylandActorSurface *actor_surface)
g_signal_handlers_disconnect_by_func (priv->actor,
meta_wayland_surface_notify_geometry_changed,
surface);
g_signal_handlers_disconnect_by_func (priv->actor,
meta_wayland_surface_update_outputs_recursively,
surface);
g_signal_handlers_disconnect_by_func (priv->actor,
meta_wayland_surface_update_outputs,
surface);
@ -446,7 +443,7 @@ meta_wayland_actor_surface_reset_actor (MetaWaylandActorSurface *actor_surface)
G_CALLBACK (meta_wayland_surface_notify_geometry_changed),
surface);
g_signal_connect_swapped (priv->actor, "notify::mapped",
G_CALLBACK (meta_wayland_surface_update_outputs_recursively),
G_CALLBACK (meta_wayland_surface_update_outputs),
surface);
g_signal_connect_swapped (priv->actor, "stage-views-changed",
G_CALLBACK (meta_wayland_surface_update_outputs),

View File

@ -1295,17 +1295,6 @@ meta_wayland_surface_update_outputs (MetaWaylandSurface *surface)
surface);
}
void
meta_wayland_surface_update_outputs_recursively (MetaWaylandSurface *surface)
{
MetaWaylandSurface *subsurface_surface;
meta_wayland_surface_update_outputs (surface);
META_WAYLAND_SURFACE_FOREACH_SUBSURFACE (surface, subsurface_surface)
meta_wayland_surface_update_outputs_recursively (subsurface_surface);
}
void
meta_wayland_surface_notify_unmapped (MetaWaylandSurface *surface)
{

View File

@ -336,8 +336,6 @@ void meta_wayland_surface_notify_subsurface_state_changed (MetaWa
void meta_wayland_surface_notify_unmapped (MetaWaylandSurface *surface);
void meta_wayland_surface_update_outputs_recursively (MetaWaylandSurface *surface);
int meta_wayland_surface_get_width (MetaWaylandSurface *surface);
int meta_wayland_surface_get_height (MetaWaylandSurface *surface);