fix: toggling DevTools while minimized on Windows (#40091)

fix: toggling devtools while minimized on Windows
This commit is contained in:
Shelley Vohr 2023-10-06 02:26:31 +02:00 committed by GitHub
parent 8f7a48879e
commit 73553032ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,8 +142,11 @@ void InspectableWebContentsViewViews::CloseDevTools() {
devtools_visible_ = false;
if (devtools_window_) {
inspectable_web_contents()->SaveDevToolsBounds(
devtools_window_->GetWindowBoundsInScreen());
auto save_bounds = devtools_window_->IsMinimized()
? devtools_window_->GetRestoredBounds()
: devtools_window_->GetWindowBoundsInScreen();
inspectable_web_contents()->SaveDevToolsBounds(save_bounds);
devtools_window_.reset();
devtools_window_web_view_ = nullptr;
devtools_window_delegate_ = nullptr;