Skip to content

Commit

Permalink
fix: toggling DevTools while minimized on Windows (#40117)
Browse files Browse the repository at this point in the history
fix: toggling devtools while minimized on Windows

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
  • Loading branch information
trop[bot] and codebytere committed Oct 6, 2023
1 parent 985b56a commit bb01e52
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions shell/browser/ui/views/inspectable_web_contents_view_views.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,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;
Expand Down

0 comments on commit bb01e52

Please sign in to comment.