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

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 DockLeft/DockRight issues 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..eec590f0fc520e9ba1043c58c9f2832ed31d2d8e 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();
varkha 2014/09/29 21:04:34 Since you have this you could s/'window_state->win
dtapuska 2014/09/30 14:40:49 Done.
+ if (window_state->IsDocked()) {
+ wm::DockWindow(window);
varkha 2014/09/29 21:04:34 Just a question - is this what allows the accelera
dtapuska 2014/09/30 14:40:49 Yes; a panel is in the panel layout manager; and i
+ } 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_state->window());
+ restore_windows_on_shelf_visible_->Remove(window_state->window());
+ } else {
+ restore_windows_on_shelf_visible_->Add(window_state->window());
+ }
+ return;
}
- return;
- }
- if (window_state->IsMinimized())
- MinimizePanel(window_state->window());
- else
- RestorePanel(window_state->window());
+ if (window_state->IsMinimized())
+ MinimizePanel(window_state->window());
+ else
+ RestorePanel(window_state->window());
+ }
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698