init gtk app

This commit is contained in:
Mitchell Hashimoto
2023-02-21 08:20:13 -08:00
parent 48c9c65915
commit f268f3955e
5 changed files with 110 additions and 15 deletions

View File

@@ -125,10 +125,11 @@ pub fn destroy(self: *App) void {
self.windows.deinit(self.alloc);
if (Darwin.enabled) self.darwin.deinit();
self.mailbox.destroy(self.alloc);
self.alloc.destroy(self);
// Close our windowing runtime
self.runtime.terminate();
self.alloc.destroy(self);
}
/// Wake up the app event loop. This should be called after any messages
@@ -164,7 +165,7 @@ pub fn tick(self: *App) !void {
i += 1;
}
// Drain our mailbox only if we're not quitting.
// // Drain our mailbox only if we're not quitting.
if (!self.quit) try self.drainMailbox();
}