aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Primak <vyivel@eclair.cafe>2023-06-03 15:47:01 +0300
committerIsaac Freund <mail@isaacfreund.com>2023-06-03 14:36:41 +0000
commitb61d5922f1d0910a848deb100570ad8587aea38d (patch)
treed516b933bd846108ad1ced532d2a782c766d6c19
parent49e9be62ae92382eddca600082785489c82ea487 (diff)
compositor: notify subsurfaces about a commit in the rendering order
This is the default order used across wlroots unless the reversed order specifically is required (e.g. in wlr_surface_surface_at()).
-rw-r--r--types/wlr_compositor.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c
index 4e32f959..689fa0da 100644
--- a/types/wlr_compositor.c
+++ b/types/wlr_compositor.c
@@ -470,18 +470,16 @@ static void surface_commit_state(struct wlr_surface *surface,
// commit subsurface order
struct wlr_subsurface *subsurface;
- wl_list_for_each_reverse(subsurface, &surface->pending.subsurfaces_above,
- pending.link) {
+ wl_list_for_each(subsurface, &surface->pending.subsurfaces_below, pending.link) {
wl_list_remove(&subsurface->current.link);
- wl_list_insert(&surface->current.subsurfaces_above,
+ wl_list_insert(surface->current.subsurfaces_below.prev,
&subsurface->current.link);
subsurface_handle_parent_commit(subsurface);
}
- wl_list_for_each_reverse(subsurface, &surface->pending.subsurfaces_below,
- pending.link) {
+ wl_list_for_each(subsurface, &surface->pending.subsurfaces_above, pending.link) {
wl_list_remove(&subsurface->current.link);
- wl_list_insert(&surface->current.subsurfaces_below,
+ wl_list_insert(surface->current.subsurfaces_above.prev,
&subsurface->current.link);
subsurface_handle_parent_commit(subsurface);