Index: ash/accelerators/accelerator_controller.cc |
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc |
index 0c072dbb2c4c52112a36fa9bdee3ee81727f5e65..0fa3fc942c5b8eb4d61af536a57bc884056fcb52 100644 |
--- a/ash/accelerators/accelerator_controller.cc |
+++ b/ash/accelerators/accelerator_controller.cc |
@@ -841,7 +841,7 @@ bool AcceleratorController::PerformAction(int action, |
case WINDOW_SNAP_LEFT: |
case WINDOW_SNAP_RIGHT: { |
wm::WindowState* window_state = wm::GetActiveWindowState(); |
- // Disable window docking shortcut key for full screen window due to |
+ // Disable window snapping shortcut key for full screen window due to |
// http://crbug.com/135487. |
if (!window_state || |
window_state->window()->type() != aura::client::WINDOW_TYPE_NORMAL || |
@@ -870,7 +870,10 @@ bool AcceleratorController::PerformAction(int action, |
} |
case WINDOW_POSITION_CENTER: { |
aura::Window* window = wm::GetActiveWindow(); |
- if (window) { |
+ // Centering a window does not maintain state and state change |
pkotwicz
2013/11/21 17:26:14
This change should have its own CL
Some comments:
varkha
2013/11/21 22:47:27
Done. Please see https://codereview.chromium.org/7
|
+ // notifications are not sent. Disable centering for docked windows. |
+ if (window && !wm::GetWindowState(window)->IsDocked()) { |
+ wm::GetWindowState(window)->SetWindowShowTypeUnsnapped(); |
wm::CenterWindow(window); |
return true; |
} |