Set resizable on Linux from InitWithOptions

This commit is contained in:
Kevin Sawicki 2016-03-07 13:48:33 -08:00
parent 993b878925
commit 7de37859f0
2 changed files with 6 additions and 7 deletions

View file

@ -115,6 +115,12 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
} else {
SetSizeConstraints(size_constraints);
}
#if defined(USE_X11)
bool resizable;
if (options.Get(options::kResizable, &resizable)) {
SetResizable(resizable);
}
#endif
#if defined(OS_WIN) || defined(USE_X11)
bool closable;
if (options.Get(options::kClosable, &closable)) {

View file

@ -120,7 +120,6 @@ NativeWindowViews::NativeWindowViews(
minimizable_(true) {
options.Get(options::kTitle, &title_);
options.Get(options::kAutoHideMenuBar, &menu_bar_autohide_);
options.Get(options::kResizable, &resizable_);
#if defined(OS_WIN)
// On Windows we rely on the CanResize() to indicate whether window can be
@ -218,12 +217,6 @@ NativeWindowViews::NativeWindowViews(
std::string window_type;
if (options.Get(options::kType, &window_type))
SetWindowType(GetAcceleratedWidget(), window_type);
if (!resizable_) {
gfx::Size content_size = GetContentSize();
SetContentSizeConstraints(
extensions::SizeConstraints(content_size, content_size));
}
#endif
// Add web view.