|
@@ -9,6 +9,7 @@
|
|
|
#include "shell/browser/browser.h"
|
|
|
#include "shell/browser/native_window_views.h"
|
|
|
#include "shell/browser/ui/views/root_view.h"
|
|
|
+#include "shell/browser/ui/views/win_frame_view.h"
|
|
|
#include "shell/common/electron_constants.h"
|
|
|
#include "ui/base/win/accessibility_misc_utils.h"
|
|
|
#include "ui/display/display.h"
|
|
@@ -419,7 +420,7 @@ void NativeWindowViews::HandleSizeEvent(WPARAM w_param, LPARAM l_param) {
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
- case SIZE_RESTORED:
|
|
|
+ case SIZE_RESTORED: {
|
|
|
switch (last_window_state_) {
|
|
|
case ui::SHOW_STATE_MAXIMIZED:
|
|
|
last_window_state_ = ui::SHOW_STATE_NORMAL;
|
|
@@ -437,7 +438,15 @@ void NativeWindowViews::HandleSizeEvent(WPARAM w_param, LPARAM l_param) {
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
+ // If a given window was minimized/maximized and has since been
|
|
|
+ // restored, ensure the WCO buttons are set to normal state.
|
|
|
+ auto* ncv = widget()->non_client_view();
|
|
|
+ if (IsWindowControlsOverlayEnabled() && ncv) {
|
|
|
+ auto* frame_view = static_cast<WinFrameView*>(ncv->frame_view());
|
|
|
+ frame_view->caption_button_container()->ResetWindowControls();
|
|
|
+ }
|
|
|
break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|