Fix subsurface PlaceBelow relationship checks

* subsurface.c (PlaceBelow): Fix conditions in check.
This commit is contained in:
hujianwei 2022-10-30 11:38:41 +00:00
parent 3732001e57
commit 0c3e5a0e7d

View file

@ -378,7 +378,7 @@ PlaceBelow (struct wl_client *client, struct wl_resource *resource,
other = wl_resource_get_user_data (surface_resource); other = wl_resource_get_user_data (surface_resource);
if (other != subsurface->parent if (other != subsurface->parent
|| !CheckSiblingRelationship (subsurface, other)) && !CheckSiblingRelationship (subsurface, other))
{ {
wl_resource_post_error (resource, WL_SUBSURFACE_ERROR_BAD_SURFACE, wl_resource_post_error (resource, WL_SUBSURFACE_ERROR_BAD_SURFACE,
"surface is not a sibling or the parent"); "surface is not a sibling or the parent");