From: Cheng Zhao Date: Thu, 15 May 2014 07:38:22 +0000 (+0800) Subject: gtk: Respect use-content-size when creating window. X-Git-Tag: v0.12.5~4^2~8 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=511a49f6fbb08b1c1190a2f9f81346a4e87438e8;p=electron.git gtk: Respect use-content-size when creating window. --- diff --git a/atom/browser/native_window_gtk.cc b/atom/browser/native_window_gtk.cc index d85cc18a..95d37994 100644 --- a/atom/browser/native_window_gtk.cc +++ b/atom/browser/native_window_gtk.cc @@ -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