osx: Set resizable flag when creating window

Setting resizable for frameless window before it is shown will change
its size.
This commit is contained in:
Cheng Zhao 2015-10-06 15:23:23 +08:00
parent 6fea6cf58a
commit 898db4d6bd
2 changed files with 8 additions and 1 deletions

View file

@ -134,10 +134,12 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
} else {
SetSizeConstraints(size_constraints);
}
#if defined(OS_WIN) || defined(USE_X11)
bool resizable;
if (options.Get(switches::kResizable, &resizable)) {
SetResizable(resizable);
}
#endif
bool top;
if (options.Get(switches::kAlwaysOnTop, &top) && top) {
SetAlwaysOnTop(true);