mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
macos: support dropping folder with window
This commit is contained in:
@ -152,7 +152,9 @@ class AppDelegate: NSObject, ObservableObject, NSApplicationDelegate, GhosttyApp
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
// Add a new tab
|
||||
windowManager.addNewTab(to: mainWindow, withBaseConfig: config)
|
||||
return true
|
||||
}
|
||||
|
||||
/// This is called for the dock right-click menu.
|
||||
|
@ -133,7 +133,7 @@ class PrimaryWindowManager {
|
||||
self.addNewTab(to: window, withBaseConfig: config)
|
||||
}
|
||||
|
||||
private func addNewTab(to window: NSWindow, withBaseConfig config: Ghostty.SurfaceConfiguration? = nil) {
|
||||
func addNewTab(to window: NSWindow, withBaseConfig config: Ghostty.SurfaceConfiguration? = nil) {
|
||||
guard let controller = createWindowController(withBaseConfig: config, cascade: false) else { return }
|
||||
guard let newWindow = addManagedWindow(windowController: controller)?.window else { return }
|
||||
window.addTabbedWindow(newWindow, ordered: .above)
|
||||
|
Reference in New Issue
Block a user