From 0b9a71ea3cb9c752e5748d002b45fd4cdfbf37dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Tue, 7 Jul 2020 16:49:31 +0200 Subject: [PATCH] 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 --- src/wayland/meta-wayland-actor-surface.c | 5 +---- src/wayland/meta-wayland-surface.c | 11 ----------- src/wayland/meta-wayland-surface.h | 2 -- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/wayland/meta-wayland-actor-surface.c b/src/wayland/meta-wayland-actor-surface.c index 5d4478253..ed7c45411 100644 --- a/src/wayland/meta-wayland-actor-surface.c +++ b/src/wayland/meta-wayland-actor-surface.c @@ -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), diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 88e84b396..d1894a8cc 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -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) { diff --git a/src/wayland/meta-wayland-surface.h b/src/wayland/meta-wayland-surface.h index c9ed38e30..0c7298886 100644 --- a/src/wayland/meta-wayland-surface.h +++ b/src/wayland/meta-wayland-surface.h @@ -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);