mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-18 09:46:07 +03:00

Non-native fullscreen has certain limitations at the moment regarding being truly fullscreen (taking all screen surface) and losing no functionality when activated. Currently, tab functionality is lost when non-native fullscreen is activated. This commit introduces the `titled-visible-menu` mode for macOS non-native fullscreen. Like `visible-menu` mode, it hides the dock and uses its surface, leaving the menubar visible. This mode makes full use of the screen (except for the menubar) while retaining the tabbar’s functionality. While a truly fullscreen non-native mode without feature loss is ideal, this implementation provides a functional alternative in the meantime.
27 lines
690 B
Swift
27 lines
690 B
Swift
import GhosttyKit
|
|
|
|
extension FullscreenMode {
|
|
/// Initialize from a Ghostty fullscreen action.
|
|
static func from(ghostty: ghostty_action_fullscreen_e) -> Self? {
|
|
return switch ghostty {
|
|
case GHOSTTY_FULLSCREEN_NATIVE:
|
|
.native
|
|
|
|
case GHOSTTY_FULLSCREEN_NON_NATIVE:
|
|
.nonNative
|
|
|
|
case GHOSTTY_FULLSCREEN_NON_NATIVE_VISIBLE_MENU:
|
|
.nonNativeVisibleMenu
|
|
|
|
case GHOSTTY_FULLSCREEN_NON_NATIVE_PADDED_NOTCH:
|
|
.nonNativePaddedNotch
|
|
|
|
case GHOSTTY_FULLSCREEN_NON_NATIVE_TITLED_VISIBLE_MENU:
|
|
.nonNativeTitledVisibleMenu
|
|
|
|
default:
|
|
nil
|
|
}
|
|
}
|
|
}
|