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

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 #8 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..c888567be330542301006e01c666e04285de3bc8 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) {
+ aura::Window* window = window_state->window();
+ if (window_state->IsDocked()) {
+ wm::DockWindow(window);
+ return;
+ }
// 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());
+ MinimizePanel(window);
+ restore_windows_on_shelf_visible_->Remove(window);
} else {
- restore_windows_on_shelf_visible_->Add(window_state->window());
+ restore_windows_on_shelf_visible_->Add(window);
}
return;
}
if (window_state->IsMinimized())
- MinimizePanel(window_state->window());
+ MinimizePanel(window);
else
- RestorePanel(window_state->window());
+ RestorePanel(window);
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698