mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 17:26:09 +03:00
Fix confirm-close-surface not working for hidden quick terminal (#5647)
Fixes #5450. https://github.com/user-attachments/assets/7090fe55-dd1f-4517-9f8a-ffc3807283db
This commit is contained in:
@ -245,7 +245,13 @@ class AppDelegate: NSObject,
|
|||||||
// This probably isn't fully safe. The isEmpty check above is aspirational, it doesn't
|
// This probably isn't fully safe. The isEmpty check above is aspirational, it doesn't
|
||||||
// quite work with SwiftUI because windows are retained on close. So instead we check
|
// quite work with SwiftUI because windows are retained on close. So instead we check
|
||||||
// if there are any that are visible. I'm guessing this breaks under certain scenarios.
|
// if there are any that are visible. I'm guessing this breaks under certain scenarios.
|
||||||
if (windows.allSatisfy { !$0.isVisible }) { return .terminateNow }
|
//
|
||||||
|
// NOTE(mitchellh): I don't think we need this check at all anymore. I'm keeping it
|
||||||
|
// here because I don't want to remove it in a patch release cycle but we should
|
||||||
|
// target removing it soon.
|
||||||
|
if (self.quickController == nil && windows.allSatisfy { !$0.isVisible }) {
|
||||||
|
return .terminateNow
|
||||||
|
}
|
||||||
|
|
||||||
// If the user is shutting down, restarting, or logging out, we don't confirm quit.
|
// If the user is shutting down, restarting, or logging out, we don't confirm quit.
|
||||||
why: if let event = NSAppleEventManager.shared().currentAppleEvent {
|
why: if let event = NSAppleEventManager.shared().currentAppleEvent {
|
||||||
|
Reference in New Issue
Block a user