mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-19 22:10:29 +00:00
macos: rework toggle_visibility to better match iTerm2
Two major changes: 1. Hiding uses `NSApp.hide` which hides all windows, preserves tabs, and yields focus to the next app. 2. Unhiding manually tracks and brings forward only the windows we hid. Proper focus should be retained.
This commit is contained in:
@@ -441,10 +441,10 @@ pub const Action = union(enum) {
|
||||
toggle_quick_terminal: void,
|
||||
|
||||
/// Show/hide all windows. If all windows become shown, we also ensure
|
||||
/// Ghostty is focused.
|
||||
/// Ghostty becomes focused. When hiding all windows, focus is yielded
|
||||
/// to the next application as determined by the OS.
|
||||
///
|
||||
/// This currently only works on macOS. When hiding all windows, we do
|
||||
/// not yield focus to the previous application.
|
||||
/// This currently only works on macOS.
|
||||
toggle_visibility: void,
|
||||
|
||||
/// Quit ghostty.
|
||||
|
||||
Reference in New Issue
Block a user