mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
app: deinit darwin info
This commit is contained in:
@ -104,6 +104,7 @@ pub fn destroy(self: *App) void {
|
||||
// Clean up all our windows
|
||||
for (self.windows.items) |window| window.destroy();
|
||||
self.windows.deinit(self.alloc);
|
||||
if (comptime builtin.target.isDarwin()) self.darwin.deinit();
|
||||
self.mailbox.destroy(self.alloc);
|
||||
self.alloc.destroy(self);
|
||||
}
|
||||
|
@ -136,7 +136,12 @@ pub fn create(alloc: Allocator, app: *App, config: *const Config) !*Window {
|
||||
if (comptime builtin.target.isDarwin()) {
|
||||
const NSWindowTabbingMode = enum(usize) { automatic = 0, preferred = 1, disallowed = 2 };
|
||||
const nswindow = objc.Object.fromId(glfwNative.getCocoaWindow(window).?);
|
||||
|
||||
// Tabbing mode enables tabbing at all
|
||||
nswindow.setProperty("tabbingMode", NSWindowTabbingMode.automatic);
|
||||
|
||||
// All windows within a tab bar must have a matching tabbing ID.
|
||||
// The app sets this up for us.
|
||||
nswindow.setProperty("tabbingIdentifier", app.darwin.tabbing_id);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user