]> khamidou — GitHub mirrors - electron.git/commitdiff
gtk: Respect use-content-size when creating window.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 15 May 2014 07:38:22 +0000 (15:38 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 15 May 2014 07:38:22 +0000 (15:38 +0800)
atom/browser/native_window_gtk.cc

index d85cc18ada155d11ece650fd5c1312788583e001..95d3799462407ee9f76316e0b097ad9d76344601 100644 (file)
@@ -114,8 +114,9 @@ NativeWindowGtk::NativeWindowGtk(content::WebContents* web_contents,
   options->GetInteger(switches::kWidth, &width);
   options->GetInteger(switches::kHeight, &height);
 
-  // Fixup the initial window size.
-  if (has_frame_)
+  bool use_content_size = false;
+  options->GetBoolean(switches::kUseContentSize, &use_content_size);
+  if (has_frame_ && !use_content_size)
     SubstractBorderSize(&width, &height);
 
   // Force a size allocation so the web page of hidden window can have correct