]> khamidou — GitHub mirrors - electron.git/commitdiff
mac: Always use GetSize for frameless window
authorCheng Zhao <zcbenz@gmail.com>
Tue, 21 Jul 2015 02:34:37 +0000 (10:34 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 21 Jul 2015 02:34:37 +0000 (10:34 +0800)
atom/browser/native_window_mac.mm

index 8d5cf7d414cfbf2134c629abbb97138cacb2caff..a4c6ee038761e1045c2c0c601df74dfb49d0762a 100644 (file)
@@ -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);
 }