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>
This commit is contained in:
Michel Dänzer 2024-05-03 18:17:41 +02:00 committed by Marge Bot
parent 08c9a775e7
commit ba93fcd30f

View file

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