summaryrefslogtreecommitdiff
path: root/stable
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-09-05 09:24:09 +0200
committerSimon Ser <contact@emersion.fr>2022-09-17 08:49:35 +0200
commit53cd10ae7792d2b465e6687a4b3e7f2a65a08c30 (patch)
tree4b9ca9223e77aa7a4b41baa8d9baa1bc68aeff7d /stable
parent83866f19d3d61b28e94d71781646466b3a6623d8 (diff)
xdg-shell: forbid loops in set_parent
These don't make sense. Add a protocol error for this case. Signed-off-by: Simon Ser <contact@emersion.fr> Closes: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/issues/105
Diffstat (limited to 'stable')
-rw-r--r--stable/xdg-shell/xdg-shell.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/stable/xdg-shell/xdg-shell.xml b/stable/xdg-shell/xdg-shell.xml
index 8c9804f..993c54a 100644
--- a/stable/xdg-shell/xdg-shell.xml
+++ b/stable/xdg-shell/xdg-shell.xml
@@ -608,6 +608,8 @@
<enum name="error">
<entry name="invalid_resize_edge" value="0" summary="provided value is
not a valid variant of the resize_edge enum"/>
+ <entry name="invalid_parent" value="1"
+ summary="invalid parent toplevel"/>
</enum>
<request name="set_parent">
@@ -628,6 +630,10 @@
the now-unmapped surface. If the now-unmapped surface has no parent,
its children's parent is unset. If the now-unmapped surface becomes
mapped again, its parent-child relationship is not restored.
+
+ The parent toplevel must not be one of the child toplevel's
+ descendants, and the parent must be different from the child toplevel,
+ otherwise the invalid_parent protocol error is raised.
</description>
<arg name="parent" type="object" interface="xdg_toplevel" allow-null="true"/>
</request>