git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commite843829233e897c298e9393bbd2ae7d6aa20f52f
parentb1d48c402d
authorIsaac Freund <[email protected]>
date2024-04-08 15:02
Root: fix leak on view destroy

This leaks memory and possibly an fd currently whenever a view is
destroyed.

 river/Root.zig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/river/Root.zig b/river/Root.zig
index 731c0e6..a33bf63 100644
--- a/river/Root.zig
+++ b/river/Root.zig
@@ -725,6 +725,7 @@ fn commitTransaction(root: *Root) void {
         // This must be done after updating cursor state in case the view was the target of move/resize.
         var it = root.hidden.inflight.focus_stack.safeIterator(.forward);
         while (it.next()) |view| {
+            view.dropSavedSurfaceTree();
             if (view.destroying) view.destroy();
         }
     }