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

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

Issue 594383002: Change behaviour of the Alt-] and Alt-[ keys so that it cycles through SnapLeft/SnapRight to DockLe… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@event
Patch Set: Address varkha's comments in #7 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
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 bf69c2c06d349518f2533258192adcfcf38e40b6..d731f8a0f966b313b228b0e144e4b256dc744a72 100644
--- a/ash/wm/panels/panel_layout_manager.cc
+++ b/ash/wm/panels/panel_layout_manager.cc
@@ -487,22 +487,27 @@ void PanelLayoutManager::OnWindowPropertyChanged(aura::Window* window,
void PanelLayoutManager::OnPostWindowStateTypeChange(
wm::WindowState* window_state,
wm::WindowStateType old_type) {
- // If the shelf is currently hidden then windows will not actually be shown
- // but the set to restore when the shelf becomes visible is updated.
- if (restore_windows_on_shelf_visible_) {
- if (window_state->IsMinimized()) {
- MinimizePanel(window_state->window());
- restore_windows_on_shelf_visible_->Remove(window_state->window());
- } else {
- restore_windows_on_shelf_visible_->Add(window_state->window());
+ aura::Window* window = window_state->window();
+ if (window_state->IsDocked()) {
+ wm::DockWindow(window);
varkha 2014/10/01 19:08:51 nit: Early return here and eliminate else. Added b
dtapuska 2014/10/01 20:17:42 Done.
+ } else {
+ // If the shelf is currently hidden then windows will not actually be shown
+ // but the set to restore when the shelf becomes visible is updated.
+ if (restore_windows_on_shelf_visible_) {
+ if (window_state->IsMinimized()) {
+ MinimizePanel(window);
+ restore_windows_on_shelf_visible_->Remove(window);
+ } else {
+ restore_windows_on_shelf_visible_->Add(window);
+ }
+ return;
}
- return;
- }
- if (window_state->IsMinimized())
- MinimizePanel(window_state->window());
- else
- RestorePanel(window_state->window());
+ if (window_state->IsMinimized())
+ MinimizePanel(window);
+ else
+ RestorePanel(window);
+ }
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698