aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-06-01 12:24:12 +0200
committerKenny Levinsen <kl@kl.wtf>2021-06-24 18:10:01 +0200
commit0d1231a6d156e6b658c631e9a2f70d43e2c2977b (patch)
tree893456eecd105156e674343136e4d92adc8c1ad3
parent1766ae3f44b5d3c59d417399b152dfd6c8eba97a (diff)
Iterate over subsurfaces below the parent surface
Update for the breaking change in [1]. [1]: https://github.com/swaywm/wlroots/pull/2948 (cherry picked from commit 3162766eef14be71789478b0984bc2c1802832b2)
-rw-r--r--sway/tree/view.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index c762fa22..124b4621 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -1031,7 +1031,10 @@ static void view_child_handle_surface_destroy(struct wl_listener *listener,
static void view_init_subsurfaces(struct sway_view *view,
struct wlr_surface *surface) {
struct wlr_subsurface *subsurface;
- wl_list_for_each(subsurface, &surface->subsurfaces, parent_link) {
+ wl_list_for_each(subsurface, &surface->subsurfaces_below, parent_link) {
+ view_subsurface_create(view, subsurface);
+ }
+ wl_list_for_each(subsurface, &surface->subsurfaces_above, parent_link) {
view_subsurface_create(view, subsurface);
}
}
@@ -1039,7 +1042,10 @@ static void view_init_subsurfaces(struct sway_view *view,
static void view_child_init_subsurfaces(struct sway_view_child *view_child,
struct wlr_surface *surface) {
struct wlr_subsurface *subsurface;
- wl_list_for_each(subsurface, &surface->subsurfaces, parent_link) {
+ wl_list_for_each(subsurface, &surface->subsurfaces_below, parent_link) {
+ view_child_subsurface_create(view_child, subsurface);
+ }
+ wl_list_for_each(subsurface, &surface->subsurfaces_above, parent_link) {
view_child_subsurface_create(view_child, subsurface);
}
}