From 0a4dfa8fd2736a21d9e9ae42810b4065273e4393 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 24 Oct 2021 12:38:44 +0530 Subject: [PATCH] macOS: Prevent resizing of fullscreen OS windows as it leads to visual artifacts --- glfw/cocoa_window.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index b8296f1c9..b1c0b2b10 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -1845,6 +1845,8 @@ void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height) } else { + // Disable window resizing in fullscreen. + if ([window->ns.object styleMask] & NSWindowStyleMaskFullScreen || window->ns.in_traditional_fullscreen) return; NSRect contentRect = [window->ns.object contentRectForFrameRect:[window->ns.object frame]]; contentRect.origin.y += contentRect.size.height - height;