From 3cb22fcda3d91763a2ea23e6abf1ebbc5315cbff Mon Sep 17 00:00:00 2001 From: lihao Date: Thu, 1 Dec 2022 11:00:26 +0800 Subject: [PATCH] fixed 204ebf8 from https://gitee.com/laigerendaqiu/third_party_flutter/pulls/220 Revert "fix mac black block when DeviceOrientation changed" This reverts commit 04778c23b6c82b377b8b1c272525ea6c5c84fd47. --- glfw/src/cocoa_window.m | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/glfw/src/cocoa_window.m b/glfw/src/cocoa_window.m index d1f9c1d6..d06ceb9e 100644 --- a/glfw/src/cocoa_window.m +++ b/glfw/src/cocoa_window.m @@ -1136,14 +1136,7 @@ void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height) acquireMonitor(window); } else - { - NSRect contentRect = - [window->ns.object contentRectForFrameRect:[window->ns.object frame]]; - contentRect.origin.y += contentRect.size.height - height; - contentRect.size = NSMakeSize(width, height); - [window->ns.object setFrame:[window->ns.object frameRectForContentRect:contentRect] - display:YES]; - } + [window->ns.object setContentSize:NSMakeSize(width, height)]; } void _glfwPlatformSetWindowSizeLimits(_GLFWwindow* window, -- Gitee