summaryrefslogtreecommitdiffstats
path: root/ash
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-19 19:28:43 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-19 19:28:43 +0000
commitb7decc9885a3f4969c60f12229d90e3405dd5558 (patch)
tree073b54cd1d50177fb9904a9d6508ae56a01f05f0 /ash
parent9f01d9a74166a1e21fa108be6d0f653e64c8675c (diff)
downloadchromium_src-b7decc9885a3f4969c60f12229d90e3405dd5558.zip
chromium_src-b7decc9885a3f4969c60f12229d90e3405dd5558.tar.gz
chromium_src-b7decc9885a3f4969c60f12229d90e3405dd5558.tar.bz2
ash: Disable window docking shortcut for non-normal window.
Since only WINDOW_TYPE_NORMAL is laided out by shell, docking shortcut key should only apply WINDOW_TYPE_NORMAL as well. BUG=132308 TEST=Verify snap left/right (Alt [ and Alt ]) does not affect app list, systerm tray bubble, bookmark bubble etc. Review URL: https://chromiumcodereview.appspot.com/10796018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147506 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r--ash/accelerators/accelerator_controller.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index be49935..ae14206 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -4,7 +4,9 @@
#include "ash/accelerators/accelerator_controller.h"
+#include <algorithm>
#include <cmath>
+#include <string>
#include "ash/accelerators/accelerator_table.h"
#include "ash/ash_switches.h"
@@ -554,9 +556,14 @@ bool AcceleratorController::PerformAction(int action,
case WINDOW_SNAP_LEFT:
case WINDOW_SNAP_RIGHT: {
aura::Window* window = wm::GetActiveWindow();
- // Disable window docking shortcut key due to http://crbug.com/135487.
- if (!window || wm::IsWindowFullscreen(window))
+ // Disable window docking shortcut key for full screen window due to
+ // http://crbug.com/135487.
+ if (!window ||
+ window->type() != aura::client::WINDOW_TYPE_NORMAL ||
+ wm::IsWindowFullscreen(window)) {
break;
+ }
+
internal::SnapSizer sizer(window,
gfx::Point(),
action == WINDOW_SNAP_LEFT ? internal::SnapSizer::LEFT_EDGE :