mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
gtk: Respect use-content-size when creating window.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user