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

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. (Added test) 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/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »
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..7806a13a666f1d4f75e1d3d6139ac169cc36d119 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 ||
@@ -870,8 +870,10 @@ bool AcceleratorController::PerformAction(int action,
return true;
}
case WINDOW_POSITION_CENTER: {
+ content::RecordAction(content::UserMetricsAction("Accel_Center"));
varkha 2013/11/22 03:43:38 I have already added UMA count for this. I moved i
aura::Window* window = wm::GetActiveWindow();
- if (window) {
+ // Docked windows do not support centering and ignore accelerator.
+ if (window && !wm::GetWindowState(window)->IsDocked()) {
wm::CenterWindow(window);
return true;
}
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698