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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 68033003: Undocks window first before side-snapping bounds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undocks window first before side-snapping bounds (rebase) 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 | ash/wm/dock/docked_window_layout_manager.cc » ('j') | ash/wm/window_state.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | ash/wm/dock/docked_window_layout_manager.cc » ('j') | ash/wm/window_state.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698