mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-15 00:06:09 +03:00
Merge pull request #642 from gpanders/new-window-no-tabs
macos: force new window for "New Window" action
This commit is contained in:
@ -96,6 +96,14 @@ class PrimaryWindowManager {
|
||||
|
||||
func addNewWindow(withBaseConfig config: Ghostty.SurfaceConfiguration? = nil) {
|
||||
guard let controller = createWindowController(withBaseConfig: config) else { return }
|
||||
|
||||
// For new windows, explicitly disallow tabbing with other windows.
|
||||
// This overrides the value of userTabbingPreference. Rationale:
|
||||
// Ghostty explicitly provides both "New Tab" and "New Window"
|
||||
// functionality, so there's no reason to make "New Window" open in a
|
||||
// tab.
|
||||
controller.window?.tabbingMode = .disallowed;
|
||||
|
||||
controller.showWindow(self)
|
||||
guard let newWindow = addManagedWindow(windowController: controller)?.window else { return }
|
||||
newWindow.makeKeyAndOrderFront(nil)
|
||||
|
Reference in New Issue
Block a user