From 428c5b6d01fb0cc7aaa465ca98832d395e16e2b2 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 6 Oct 2015 14:50:18 +0800 Subject: [PATCH] Setting "x" and "y" should not change window size --- atom/browser/native_window.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 641bdd3757..981804cb22 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(); }