From: Cheng Zhao Date: Tue, 6 Oct 2015 06:50:18 +0000 (+0800) Subject: Setting "x" and "y" should not change window size X-Git-Tag: v0.33.7~26^2~4^2~6 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=428c5b6d01fb0cc7aaa465ca98832d395e16e2b2;p=electron.git Setting "x" and "y" should not change window size --- diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 641bdd37..981804cb 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -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, ¢er) && center) { Center(); }