]> khamidou — GitHub mirrors - electron.git/commitdiff
Setting "x" and "y" should not change window size
authorCheng Zhao <zcbenz@gmail.com>
Tue, 6 Oct 2015 06:50:18 +0000 (14:50 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 6 Oct 2015 06:50:18 +0000 (14:50 +0800)
atom/browser/native_window.cc

index 641bdd3757a13dac73e83fc9e07ea9d2c9ad5210..981804cb22c9beb77586c17f5e41253611c97b3b 100644 (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();
   }