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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 79023009: Avoids centering docked windows, Unsnaps when centering. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoids centering docked windows, Unsnaps when centering. 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/window_util.cc » ('j') | ash/wm/window_util.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 f761acb721e26ca11f9439431a32ed91097fc1cf..94494123619ffa08744dedc554b9097636b23652 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -842,7 +842,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 ||
@@ -871,7 +871,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
+ // notifications are not sent. Disable centering for docked windows.
pkotwicz 2013/11/21 23:46:50 I find it hard to understand the comment. This may
varkha 2013/11/22 03:43:38 Done.
+ content::RecordAction(content::UserMetricsAction("Accel_Center"));
+ if (window && !wm::GetWindowState(window)->IsDocked()) {
wm::CenterWindow(window);
return true;
}
« no previous file with comments | « no previous file | ash/wm/window_util.cc » ('j') | ash/wm/window_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698