mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: return correct bounds on will-resize (#19705)
This commit is contained in:
committed by
Shelley Vohr
parent
11037230eb
commit
b58b5980a4
@@ -9,6 +9,7 @@
|
||||
#include "atom/browser/ui/cocoa/atom_preview_item.h"
|
||||
#include "atom/browser/ui/cocoa/atom_touch_bar.h"
|
||||
#include "base/mac/mac_util.h"
|
||||
#include "ui/gfx/mac/coordinate_conversion.h"
|
||||
#include "ui/views/cocoa/bridged_native_widget_host_impl.h"
|
||||
#include "ui/views/widget/native_widget_mac.h"
|
||||
#include "ui/views_bridge_mac/bridged_native_widget_impl.h"
|
||||
@@ -116,8 +117,10 @@
|
||||
|
||||
{
|
||||
bool prevent_default = false;
|
||||
gfx::Rect new_bounds(gfx::Point(sender.frame.origin), gfx::Size(newSize));
|
||||
shell_->NotifyWindowWillResize(new_bounds, &prevent_default);
|
||||
NSRect new_bounds = NSMakeRect(sender.frame.origin.x, sender.frame.origin.y,
|
||||
newSize.width, newSize.height);
|
||||
shell_->NotifyWindowWillResize(gfx::ScreenRectFromNSRect(new_bounds),
|
||||
&prevent_default);
|
||||
if (prevent_default) {
|
||||
return sender.frame.size;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user