From: Cheng Zhao Date: Tue, 21 Jul 2015 02:34:37 +0000 (+0800) Subject: mac: Always use GetSize for frameless window X-Git-Tag: v0.30.1~15^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=891d107a5169875634d260f5375aead19249db6d;p=electron.git mac: Always use GetSize for frameless window --- diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index 8d5cf7d4..a4c6ee03 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -512,6 +512,9 @@ void NativeWindowMac::SetContentSize(const gfx::Size& size) { } gfx::Size NativeWindowMac::GetContentSize() { + if (!has_frame_) + return GetSize(); + NSRect bounds = [[window_ contentView] bounds]; return gfx::Size(bounds.size.width, bounds.size.height); }