From f5269df68f8250e5f4fc8b879553f24f54455cca Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 27 Mar 2023 10:47:54 -0700 Subject: [PATCH] apprt/glfw: quit cleans up resources properly --- src/apprt/glfw.zig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/apprt/glfw.zig b/src/apprt/glfw.zig index a3e43b153..d8da82640 100644 --- a/src/apprt/glfw.zig +++ b/src/apprt/glfw.zig @@ -93,7 +93,13 @@ pub const App = struct { // Tick the terminal app const should_quit = try self.app.tick(self); - if (should_quit) return; + if (should_quit) { + for (self.app.surfaces.items) |surface| { + surface.close(false); + } + + return; + } } }