mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-06 07:38:21 +00:00
macos: defer key-window focus sync to reduce churn
Amp-Thread-ID: https://ampcode.com/threads/T-019cb9fe-b11b-753f-99e7-8ecc52b73ec4 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -1239,9 +1239,11 @@ class BaseTerminalController: NSWindowController,
|
||||
}
|
||||
}
|
||||
|
||||
// Becoming/losing key means we have to notify our surface(s) that we have focus
|
||||
// so things like cursors blink, pty events are sent, etc.
|
||||
self.syncFocusToSurfaceTree()
|
||||
// Becoming key can race with responder updates when activating a window.
|
||||
// Sync on the next runloop so split focus has settled first.
|
||||
DispatchQueue.main.async {
|
||||
self.syncFocusToSurfaceTree()
|
||||
}
|
||||
}
|
||||
|
||||
func windowDidResignKey(_ notification: Notification) {
|
||||
|
||||
Reference in New Issue
Block a user