From d7d0c2fc6d4e5c54aaa7d95b8461d9e3a70e1142 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 16 Nov 2022 12:15:37 -0500 Subject: [PATCH] mac: Fix bug in GetNSBoundsInDisplay (see issue #3359) --- libcef/browser/native/browser_platform_delegate_native_mac.mm | 2 +- tests/cefclient/browser/root_window_mac.mm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libcef/browser/native/browser_platform_delegate_native_mac.mm b/libcef/browser/native/browser_platform_delegate_native_mac.mm index a8ce16a32..d8af708d2 100644 --- a/libcef/browser/native/browser_platform_delegate_native_mac.mm +++ b/libcef/browser/native/browser_platform_delegate_native_mac.mm @@ -210,7 +210,7 @@ void GetNSBoundsInDisplay(const gfx::Rect& dip_bounds, if (input_content_bounds) { // Compute frame rect from content rect. Keep the requested origin. content_rect = requested_rect; - frame_rect = [NSWindow frameRectForContentRect:frame_rect + frame_rect = [NSWindow frameRectForContentRect:content_rect styleMask:style_mask]; frame_rect.origin = requested_rect.origin; } else { diff --git a/tests/cefclient/browser/root_window_mac.mm b/tests/cefclient/browser/root_window_mac.mm index 31f718f0d..30b5e27bb 100644 --- a/tests/cefclient/browser/root_window_mac.mm +++ b/tests/cefclient/browser/root_window_mac.mm @@ -161,7 +161,7 @@ void GetNSBoundsInDisplay(const CefRect& dip_bounds, if (input_content_bounds) { // Compute frame rect from content rect. Keep the requested origin. content_rect = requested_rect; - frame_rect = [NSWindow frameRectForContentRect:frame_rect + frame_rect = [NSWindow frameRectForContentRect:content_rect styleMask:style_mask]; frame_rect.origin = requested_rect.origin; } else {