From 709d06e89e858cf907e17b5104b4cfa74486dd77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 17 Jun 2022 16:33:17 +0200 Subject: [PATCH] wayland/surface: The same sub-surface is not a valid sibling The Wayland protocol documentation at https://wayland.app/protocols/wayland#wl_subsurface:request:place_above says: The reference surface must be one of the sibling surfaces, or the parent surface. Using any other surface, including this sub-surface, will cause a protocol error. v2: * Leave it as a single line. (Georges Basile Stavracas Neto) Part-of: --- src/wayland/meta-wayland-subsurface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-subsurface.c b/src/wayland/meta-wayland-subsurface.c index 4055e6882..3e088b04f 100644 --- a/src/wayland/meta-wayland-subsurface.c +++ b/src/wayland/meta-wayland-subsurface.c @@ -102,7 +102,7 @@ static gboolean is_sibling (MetaWaylandSurface *surface, MetaWaylandSurface *sibling) { - return surface->sub.parent == sibling->sub.parent; + return surface != sibling && surface->sub.parent == sibling->sub.parent; } static gboolean