cocoa is weird

This commit is contained in:
Kovid Goyal 2021-11-11 12:45:03 +05:30
parent be79fc1c92
commit 9be37f7d2d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -2410,7 +2410,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 && @available(macOS 10.16, *)) return w->ns.in_traditional_fullscreen; if (traditional) { if(@available(macOS 10.16, *)) return w->ns.in_traditional_fullscreen; }
NSWindowStyleMask sm = [window styleMask]; NSWindowStyleMask sm = [window styleMask];
return sm & NSWindowStyleMaskFullScreen; return sm & NSWindowStyleMaskFullScreen;
} }