1
0
Fork 0

wayland/actor-surface: Don't listen to notify::position signal

We started listening to "notify::position" on surface actors with commit
08e4cb54. This commit was done to fix a regression from commit cf1edff9,
which forgot to handle some cases like the actual WindowActor and not
the SurfaceActor (which is a child of the WindowActor) moving (that was
fixed by listening to MetaWindows "position-changed" signal). Also that
commit introduced meta_wayland_surface_update_outputs_recursively(),
which updates the outputs of all (sub-)surfaces in case any position
changed and made sure subsurfaces also get their outputs updated in case
the parent actor moved.

Connecting to the "notify::position" signal, which the above commit also
did is now superflous though because position changes will queue a
relayout and the actors allocation will change during the next
allocation cycle, notifying the "allocation" property which we also
listen to.

So save some resources and stop listening to that signal.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1235
This commit is contained in:
Jonas Dreßler 2020-03-09 12:30:20 +01:00
parent e12b2c417e
commit e68bb27df2

View file

@ -414,9 +414,6 @@ meta_wayland_actor_surface_reset_actor (MetaWaylandActorSurface *actor_surface)
g_signal_connect_swapped (priv->actor, "notify::allocation", g_signal_connect_swapped (priv->actor, "notify::allocation",
G_CALLBACK (meta_wayland_surface_notify_geometry_changed), G_CALLBACK (meta_wayland_surface_notify_geometry_changed),
surface); surface);
g_signal_connect_swapped (priv->actor, "notify::position",
G_CALLBACK (meta_wayland_surface_notify_geometry_changed),
surface);
g_signal_connect_swapped (priv->actor, "notify::mapped", g_signal_connect_swapped (priv->actor, "notify::mapped",
G_CALLBACK (meta_wayland_surface_notify_geometry_changed), G_CALLBACK (meta_wayland_surface_notify_geometry_changed),
surface); surface);