mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
mac: fix split initial focus
When making a split, the window focus doesn't change so the new splits were defaulting to "false" (not focused). Let's just assume when a surface is created that it is in fact focused. This generally fixes the issue. If we ever programmatically create splits in background windows this will probably fail so we should find a way on View init to detect if the window has focus.
This commit is contained in:
@ -42,7 +42,7 @@ extension Ghostty {
|
||||
@FocusState private var surfaceFocus: Bool
|
||||
|
||||
// Maintain whether our window has focus (is key) or not
|
||||
@State private var windowFocus: Bool = false
|
||||
@State private var windowFocus: Bool = true
|
||||
|
||||
// This is true if the terminal is considered "focused". The terminal is focused if
|
||||
// it is both individually focused and the containing window is key.
|
||||
|
Reference in New Issue
Block a user