mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 08:18:08 +02:00
Fixes traditional fullscreen hide for Mac OS >= 10.15
This commit is contained in:
@@ -2302,7 +2302,7 @@ void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor UNUSED)
|
|||||||
bool _glfwPlatformIsFullscreen(_GLFWwindow* w, unsigned int flags) {
|
bool _glfwPlatformIsFullscreen(_GLFWwindow* w, unsigned int flags) {
|
||||||
NSWindow *window = w->ns.object;
|
NSWindow *window = w->ns.object;
|
||||||
bool traditional = !(flags & 1);
|
bool traditional = !(flags & 1);
|
||||||
if (traditional) { if(@available(macOS 11.0, *)) return w->ns.in_traditional_fullscreen; }
|
if (traditional) { if(@available(macOS 10.15, *)) return w->ns.in_traditional_fullscreen; }
|
||||||
NSWindowStyleMask sm = [window styleMask];
|
NSWindowStyleMask sm = [window styleMask];
|
||||||
return sm & NSWindowStyleMaskFullScreen;
|
return sm & NSWindowStyleMaskFullScreen;
|
||||||
}
|
}
|
||||||
@@ -2313,8 +2313,8 @@ bool _glfwPlatformToggleFullscreen(_GLFWwindow* w, unsigned int flags) {
|
|||||||
bool traditional = !(flags & 1);
|
bool traditional = !(flags & 1);
|
||||||
NSWindowStyleMask sm = [window styleMask];
|
NSWindowStyleMask sm = [window styleMask];
|
||||||
if (traditional) {
|
if (traditional) {
|
||||||
if (@available(macOS 11.0, *)) {
|
if (@available(macOS 10.15, *)) {
|
||||||
// As of Big Turd NSWindowStyleMaskFullScreen is no longer useable
|
// Also no longer compatible after a minor release of macOS 10.15
|
||||||
if (!w->ns.in_traditional_fullscreen) {
|
if (!w->ns.in_traditional_fullscreen) {
|
||||||
w->ns.pre_full_screen_style_mask = sm;
|
w->ns.pre_full_screen_style_mask = sm;
|
||||||
[window setStyleMask: NSWindowStyleMaskBorderless];
|
[window setStyleMask: NSWindowStyleMaskBorderless];
|
||||||
|
|||||||
Reference in New Issue
Block a user