Setting "x" and "y" should not change window size

This commit is contained in:
Cheng Zhao 2015-10-06 14:50:18 +08:00
parent b70e7c6a4c
commit 428c5b6d01

View file

@ -112,10 +112,7 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
int x = -1, y = -1;
bool center;
if (options.Get(switches::kX, &x) && options.Get(switches::kY, &y)) {
int width = -1, height = -1;
options.Get(switches::kWidth, &width);
options.Get(switches::kHeight, &height);
SetBounds(gfx::Rect(x, y, width, height));
SetPosition(gfx::Point(x, y));
} else if (options.Get(switches::kCenter, &center) && center) {
Center();
}