From 91414dde62f9b829f2ebb856eb040fc764f7596c Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Mon, 30 Oct 2017 11:19:50 -0700 Subject: [PATCH 1/4] :wrench: I can't believe this helps --- atom/browser/native_window.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 487557cd3118..0a0db7c548a4 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -117,6 +117,14 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) { bool center; if (options.Get(options::kX, &x) && options.Get(options::kY, &y)) { SetPosition(gfx::Point(x, y)); + +#if DEFINEED(OS_WIN) + // Dirty, dirty workaround for + // https://github.com/electron/electron/issues/10862 + // Somehow, we need to call `SetBounds` twice to get + // usable results. The root cause is still unknown. + SetPosition(gfx::Point(x, y)); +#endif } else if (options.Get(options::kCenter, ¢er) && center) { Center(); } From 08b8f2df5575b151c752db0e6ab413bfe7cd2fbb Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Tue, 31 Oct 2017 08:38:33 -0700 Subject: [PATCH 2/4] :memo: Typo! --- atom/browser/native_window.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 0a0db7c548a4..0010928f92eb 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -118,7 +118,7 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) { if (options.Get(options::kX, &x) && options.Get(options::kY, &y)) { SetPosition(gfx::Point(x, y)); -#if DEFINEED(OS_WIN) +#if DEFINED(OS_WIN) // Dirty, dirty workaround for // https://github.com/electron/electron/issues/10862 // Somehow, we need to call `SetBounds` twice to get From 58708d6242fce9d28ea5d597a21656cd1becc21f Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Tue, 31 Oct 2017 10:31:05 -0700 Subject: [PATCH 3/4] :wrench: Lowercase --- atom/browser/native_window.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 0010928f92eb..813b33f5c57c 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -118,7 +118,7 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) { if (options.Get(options::kX, &x) && options.Get(options::kY, &y)) { SetPosition(gfx::Point(x, y)); -#if DEFINED(OS_WIN) +#if defined(OS_WIN) // Dirty, dirty workaround for // https://github.com/electron/electron/issues/10862 // Somehow, we need to call `SetBounds` twice to get From e8f8100e19de0206dd0e3a4ed2f65d3e91e37c87 Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Wed, 1 Nov 2017 11:30:32 -0700 Subject: [PATCH 4/4] :wrench: Add fixme --- atom/browser/native_window.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 813b33f5c57c..b22ddfb2509c 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -119,7 +119,7 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) { SetPosition(gfx::Point(x, y)); #if defined(OS_WIN) - // Dirty, dirty workaround for + // FIXME(felixrieseberg): Dirty, dirty workaround for // https://github.com/electron/electron/issues/10862 // Somehow, we need to call `SetBounds` twice to get // usable results. The root cause is still unknown.