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

Unified Diff: ash/wm/base_layout_manager.cc

Issue 56483003: Unminimize the minimized state, instead of showing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/base_layout_manager.cc
diff --git a/ash/wm/base_layout_manager.cc b/ash/wm/base_layout_manager.cc
index 65fb820215b77b91246a5d710f43efdec7c6284f..5070654ae8d16b7f714aae5df473fadcd2de79ab 100644
--- a/ash/wm/base_layout_manager.cc
+++ b/ash/wm/base_layout_manager.cc
@@ -131,7 +131,7 @@ void BaseLayoutManager::OnWindowActivated(aura::Window* gained_active,
wm::WindowState* window_state = wm::GetWindowState(gained_active);
if (window_state && window_state->IsMinimized() &&
!gained_active->IsVisible()) {
- gained_active->Show();
+ window_state->Unminimize();
DCHECK(!window_state->IsMinimized());
}
}
@@ -172,6 +172,9 @@ void BaseLayoutManager::ShowStateChanged(
wm::WindowState* window_state,
ui::WindowShowState last_show_state) {
if (window_state->IsMinimized()) {
+ if (last_show_state == ui::SHOW_STATE_MINIMIZED)
+ return;
+
// Save the previous show state so that we can correctly restore it.
window_state->window()->SetProperty(aura::client::kRestoreShowStateKey,
last_show_state);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698