mirror of
https://github.com/electron/electron.git
synced 2026-01-27 16:28:23 -05:00
🔧 I can't believe this helps
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user