mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-16 14:56:10 +00:00
macOS: Fix New Tab behaviours (#9124)
- Fix `macos-dock-drop-behavior = new-tab` not working, which also affects `open /path/to/directory -a Ghostty.app` - Fix 'New Tab' in dock icon not working **when Ghostty's not active** ### Issue preview with `1.2.2(12187)` https://github.com/user-attachments/assets/18068cc2-c25d-4360-97ab-cec22d5d3ff4
This commit is contained in:
@@ -465,7 +465,12 @@ class AppDelegate: NSObject,
|
||||
}
|
||||
|
||||
switch ghostty.config.macosDockDropBehavior {
|
||||
case .new_tab: _ = TerminalController.newTab(ghostty, withBaseConfig: config)
|
||||
case .new_tab:
|
||||
_ = TerminalController.newTab(
|
||||
ghostty,
|
||||
from: TerminalController.preferredParent?.window,
|
||||
withBaseConfig: config
|
||||
)
|
||||
case .new_window: _ = TerminalController.newWindow(ghostty, withBaseConfig: config)
|
||||
}
|
||||
|
||||
@@ -1002,13 +1007,15 @@ class AppDelegate: NSObject,
|
||||
//UpdateSimulator.happyPath.simulate(with: updateViewModel)
|
||||
}
|
||||
|
||||
|
||||
@IBAction func newWindow(_ sender: Any?) {
|
||||
_ = TerminalController.newWindow(ghostty)
|
||||
}
|
||||
|
||||
@IBAction func newTab(_ sender: Any?) {
|
||||
_ = TerminalController.newTab(ghostty)
|
||||
_ = TerminalController.newTab(
|
||||
ghostty,
|
||||
from: TerminalController.preferredParent?.window
|
||||
)
|
||||
}
|
||||
|
||||
@IBAction func closeAllWindows(_ sender: Any?) {
|
||||
|
Reference in New Issue
Block a user