Commit Graph

4 Commits

Author SHA1 Message Date
Kirill Primak 7dde2b66d6 scene/subsurface_tree: fix handling subsurface destruction
This commit renames map/unmap listeners to clarify that they handle
subsurface events, and ensures the node is always destroyed before
the subsurface.

Without this patch, wl_list_remove() would operate on listener links in
already freed memory. glibc is usually lenient to bugs like this, but
musl isn't.

(cherry picked from commit 83ab5055fd36bd0f8a0106257e45d8ed303636d8)
2022-02-02 20:08:20 +01:00
tiosgz cc2ebd9fc0 scene/subsurface_tree: hide unmapped subsurfaces 2021-10-31 17:07:13 +01:00
Simon Ser a80f2b2816 scene: inline subsurface_tree_destroy
This is only called from one function.

To destroy the wlr_scene_subsurface_tree from elsewhere, callers
can destroy the scene-graph node returned by
wlr_scene_subsurface_tree_create instead (just like a compositor
would do). subsurface_tree_handle_surface_destroy does exactly this.

Inlining avoids calling subsurface_tree_destroy by mistake.
2021-10-27 16:18:10 +02:00
Simon Ser 2e590026e9 scene: add wlr_scene_subsurface_tree_create 2021-09-21 16:48:31 +02:00