From 2eb6494682581e1fec26540685846718c5bc3314 Mon Sep 17 00:00:00 2001 From: Jean-Luc Mackail Date: Sat, 30 Sep 2023 19:38:28 +1000 Subject: [PATCH] Cocoa: Make sure NSWindowStyleMaskResizable is masked when entering fullscreen. On macOS Catalina and earlier, not having the resizable bit cleared in NSWindowStyleMask in fullscreen leads to windows minimising when clicked anywhere in the content area. TODO: This bug doesn't seem to occur on macOS Big Sur and later, needs testing on later macOS versions for any regressions. Fixes issue #2377. --- src/cocoa_window.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 6f8aa978..a58a8555 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1279,7 +1279,7 @@ void _glfwSetWindowMonitorCocoa(_GLFWwindow* window, if (window->monitor) { - styleMask &= ~(NSWindowStyleMaskTitled | NSWindowStyleMaskClosable); + styleMask &= ~(NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskResizable); styleMask |= NSWindowStyleMaskBorderless; } else