This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch wl/browser-all
in repository enlightenment.
View the commit online.
commit fe42191c59fb813a70225c18ba5dddba53278add
Author: Cedric BAIL <[email protected]>
AuthorDate: Mon Aug 10 18:38:24 2026 -0600
e_comp_wl - the parent surface is a valid place_above reference
wl_subsurface.place_above and place_below take "one of the sibling
surfaces, or the parent surface" as the reference. Both callbacks tested
the reference for sub.data and gave up when it was missing, and the parent
surface is precisely the surface that has none - so the documented way to
move a sub-surface to the bottom of the sibling stack was dropped on the
floor without so much as a protocol error.
Accept it in place_above: relative to the parent, the bottom of the stack
is the head of sub.list.
place_below against the parent is left alone deliberately. It is a legal
request, but sub.list only describes what sits above the parent and has
nowhere to record "underneath" - Weston keeps the parent in the list as a
marker so it can. Doing that here means reworking the sub-surface model
with no test to catch a mistake, so this stays a no-op, but a stated one
rather than an accident of the guard above it.
---
src/bin/e_comp_wl.c | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 96e7b21a5..65379544d 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -2501,15 +2501,22 @@ _e_comp_wl_subsurface_cb_place_above(struct wl_client *client EINA_UNUSED, struc
/* try to get the client from the sibling resource */
if (!(ecs = wl_resource_get_user_data(sibling_resource))) return;
- if (!ecs->comp_data->sub.data) return;
-
if (!(parent = ec->comp_data->sub.data->parent)) return;
+ /* The reference may be a sibling or the parent itself - both are legal.
+ * Demanding sub.data here rejected the parent, which is the documented way
+ * to ask for the bottom of the sibling stack. */
+ if ((ecs != parent) && (!ecs->comp_data->sub.data)) return;
+
parent->comp_data->sub.list =
eina_list_remove(parent->comp_data->sub.list, ec);
- parent->comp_data->sub.list =
- eina_list_append_relative(parent->comp_data->sub.list, ec, ecs);
+ if (ecs == parent)
+ parent->comp_data->sub.list =
+ eina_list_prepend(parent->comp_data->sub.list, ec);
+ else
+ parent->comp_data->sub.list =
+ eina_list_append_relative(parent->comp_data->sub.list, ec, ecs);
parent->comp_data->sub.restack_target = parent;
}
@@ -2530,10 +2537,18 @@ _e_comp_wl_subsurface_cb_place_below(struct wl_client *client EINA_UNUSED, struc
/* try to get the client from the sibling resource */
if (!(ecs = wl_resource_get_user_data(sibling_resource))) return;
- if (!ecs->comp_data->sub.data) return;
-
if (!(parent = ec->comp_data->sub.data->parent)) return;
+ /* Below the parent is a legal request, but sub.list only describes the
+ * sub-surfaces stacked above the parent - there is nowhere in it to say
+ * "underneath". Weston carries the parent inside the list as a marker to
+ * get this; until we do something equivalent, leave the order alone rather
+ * than silently putting the surface above the parent, which is the one
+ * answer we know to be wrong. */
+ if (ecs == parent) return;
+
+ if (!ecs->comp_data->sub.data) return;
+
parent->comp_data->sub.list =
eina_list_remove(parent->comp_data->sub.list, ec);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.