Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2163)

Unified Diff: ash/wm/panels/panel_layout_manager.cc

Issue 582803002: Don't minimize dragged window when shelf hidden. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge and add comments Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/wm/panels/panel_window_resizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/panels/panel_layout_manager.cc
diff --git a/ash/wm/panels/panel_layout_manager.cc b/ash/wm/panels/panel_layout_manager.cc
index a19c24568ab7383d1f2629a73e998014ec12810a..bf69c2c06d349518f2533258192adcfcf38e40b6 100644
--- a/ash/wm/panels/panel_layout_manager.cc
+++ b/ash/wm/panels/panel_layout_manager.cc
@@ -551,10 +551,14 @@ void PanelLayoutManager::WillChangeVisibilityState(
return;
scoped_ptr<aura::WindowTracker> minimized_windows(new aura::WindowTracker);
for (PanelList::iterator iter = panel_windows_.begin();
- iter != panel_windows_.end(); ++iter) {
- if (iter->window->IsVisible()) {
- minimized_windows->Add(iter->window);
- wm::GetWindowState(iter->window)->Minimize();
+ iter != panel_windows_.end();) {
+ aura::Window* window = iter->window;
+ // Minimizing a panel window may remove it from the panel_windows_ list.
+ // Advance the iterator before minimizing it: http://crbug.com/393047.
+ ++iter;
+ if (window != dragged_panel_ && window->IsVisible()) {
+ minimized_windows->Add(window);
+ wm::GetWindowState(window)->Minimize();
}
}
restore_windows_on_shelf_visible_ = minimized_windows.Pass();
« no previous file with comments | « no previous file | ash/wm/panels/panel_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698