wayland/subsurface: Check ancestor instead of toplevel window for actor sync

The intention here was to check if the subsurface belongs to a window.
Thus it didn't behave as expected for subsurfaces belonging to non-toplevel
windows.

After the previous commit we can use `get_window()` to check for what we
actually want here.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2717>
This commit is contained in:
Robert Mader 2022-11-24 17:15:03 +01:00 committed by Marge Bot
parent 8af356c2c7
commit 225f7d46a3

View File

@ -242,10 +242,8 @@ meta_wayland_subsurface_sync_actor_state (MetaWaylandActorSurface *actor_surface
meta_wayland_surface_role_get_surface (surface_role);
MetaWaylandActorSurfaceClass *actor_surface_class =
META_WAYLAND_ACTOR_SURFACE_CLASS (meta_wayland_subsurface_parent_class);
MetaWaylandSurface *toplevel_surface;
toplevel_surface = meta_wayland_surface_get_toplevel (surface);
if (toplevel_surface && meta_wayland_surface_get_window (toplevel_surface))
if (meta_wayland_surface_get_window (surface))
actor_surface_class->sync_actor_state (actor_surface);
sync_actor_subsurface_state (surface);