Add config setting to turn non-native fullscreen on or off

This commit is contained in:
Thorsten Ball
2023-07-29 21:05:49 +02:00
committed by Mitchell Hashimoto
parent 850bf3e945
commit b56ffa6285
9 changed files with 45 additions and 14 deletions

View File

@@ -110,8 +110,12 @@ struct ContentView: View {
// currently focused window.
guard let window = self.window else { return }
guard window.isKeyWindow else { return }
self.fsHandler.toggleFullscreen(window: window)
// Check whether we use non-native fullscreen
guard let useNonNativeFullscreenAny = notification.userInfo?[Ghostty.Notification.NonNativeFullscreenKey] else { return }
guard let useNonNativeFullscreen = useNonNativeFullscreenAny as? Bool else { return }
self.fsHandler.toggleFullscreen(window: window, nonNativeFullscreen: useNonNativeFullscreen)
// After toggling fullscreen we need to focus the terminal again.
self.focused = true
}