diff --git a/macos/Sources/App/macOS/AppDelegate.swift b/macos/Sources/App/macOS/AppDelegate.swift index 4b11b68aa6..3724df7b74 100644 --- a/macos/Sources/App/macOS/AppDelegate.swift +++ b/macos/Sources/App/macOS/AppDelegate.swift @@ -708,7 +708,11 @@ class AppDelegate: NSObject, } /// Toggles visibility of all Ghosty Terminal windows. When hidden, activates Ghostty as the frontmost application + /// + /// - Note: When the focused surface is fullscreen, this method does nothing. @IBAction func toggleVisibility(_ sender: Any) { + guard NSApp.keyWindow?.styleMask.contains(.fullScreen) == false else { return } + // If we have focus, then we hide all windows. if NSApp.isActive { // We need to keep track of the windows that were visible because we only diff --git a/src/input/Binding.zig b/src/input/Binding.zig index 19c1031957..90ea436af1 100644 --- a/src/input/Binding.zig +++ b/src/input/Binding.zig @@ -470,6 +470,8 @@ pub const Action = union(enum) { /// Ghostty becomes focused. When hiding all windows, focus is yielded /// to the next application as determined by the OS. /// + /// Note: When the focused surface is fullscreen, this method does nothing. + /// /// This currently only works on macOS. toggle_visibility: void,