1
0
Fork 0

wayland/subsurface: Make sure siblings are actually sub-surfaces

Without this check, is_sibling could spuriously return TRUE when neither
surface passed in was actually a sub-surface.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3737>
(cherry picked from commit ba93fcd30f)
This commit is contained in:
Michel Dänzer 2024-05-22 12:07:53 +02:00 committed by Jonas Ådahl
parent 3c3e649a32
commit f7b13fd74f

View file

@ -104,6 +104,7 @@ is_sibling (MetaWaylandSurface *surface,
MetaWaylandSurface *sibling)
{
return surface != sibling &&
surface->committed_state.parent &&
surface->committed_state.parent == sibling->committed_state.parent;
}