summaryrefslogtreecommitdiffstats
path: root/ash/wm/app_list_controller.cc
diff options
context:
space:
mode:
authorxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 23:30:13 +0000
committerxiyuan@chromium.org <xiyuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 23:30:13 +0000
commit27c84fc7989177d1916e0bd286c6392676648e4b (patch)
treede3f4f4b156dbd2cc5b1cadae27efca230ed058d /ash/wm/app_list_controller.cc
parent7c8caec2246c144b22d555eb62022ae1779278e7 (diff)
downloadchromium_src-27c84fc7989177d1916e0bd286c6392676648e4b.zip
chromium_src-27c84fc7989177d1916e0bd286c6392676648e4b.tar.gz
chromium_src-27c84fc7989177d1916e0bd286c6392676648e4b.tar.bz2
cros: Respect app list hit test mask in ProcessLocatedEvent.
BUG=156497 TEST=Click/touch right below app list (i.e. in the shadow area) should close it. R=sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/11194056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162835 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/app_list_controller.cc')
-rw-r--r--ash/wm/app_list_controller.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc
index f7f7390..f384c44 100644
--- a/ash/wm/app_list_controller.cc
+++ b/ash/wm/app_list_controller.cc
@@ -221,11 +221,14 @@ void AppListController::ProcessLocatedEvent(aura::Window* target,
}
if (view_ && is_visible_) {
- views::Widget* widget = view_->GetWidget();
- if (!widget->GetNativeView()->GetBoundsInRootWindow().Contains(
- event.root_location())) {
+ aura::Window* window = view_->GetWidget()->GetNativeView();
+ gfx::Point window_local_point(event.root_location());
+ aura::Window::ConvertPointToTarget(window->GetRootWindow(),
+ window,
+ &window_local_point);
+ // Use HitTest to respect the hit test mask of the bubble.
+ if (!window->HitTest(window_local_point))
SetVisible(false);
- }
}
}