]> khamidou — GitHub mirrors - electron.git/commitdiff
mac: Override system's default on resizing window no larger than screen.
authorCheng Zhao <zcbenz@gmail.com>
Mon, 11 Aug 2014 02:24:36 +0000 (10:24 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 11 Aug 2014 02:24:36 +0000 (10:24 +0800)
atom/browser/native_window_mac.mm

index cac5d63e02022d4766673c9c48201d8b683a687e..885eb3b0f7d4a1bbfe3366ae1bb8b1f533eae8c7 100644 (file)
@@ -120,6 +120,11 @@ static const CGFloat kAtomWindowCornerRadius = 4.0;
   shell_ = shell;
 }
 
+// Enable the window to be larger than screen.
+- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen*)screen {
+  return frameRect;
+}
+
 - (IBAction)reload:(id)sender {
   shell_->GetWebContents()->GetController().ReloadIgnoringCache(false);
 }