From 32774816818d661651dc2689544eeec333b2b124 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Thu, 3 Apr 2025 17:50:44 -0500 Subject: [PATCH] fix: `NativeWindowViews::GetRestoredState()` can return wrong state when maximized (#46464) fix: NativeWindowViews::GetRestoredState() returning wrong state Introduced by the af58931 Chromium 131.0.6744.0 roll, specifically https://github.com/electron/electron/pull/43948/commits/9840662#diff-f9d7ef7 98406626 Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr --- shell/browser/native_window_views.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index f3cae134b50e..e1756a6a8cee 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -1835,7 +1835,7 @@ ui::mojom::WindowShowState NativeWindowViews::GetRestoredState() { return ui::mojom::WindowShowState::kMaximized; } #else - return ui::mojom::WindowShowState::kMinimized; + return ui::mojom::WindowShowState::kMaximized; #endif }