Chromium Code Reviews| Index: ash/wm/app_list_controller.cc |
| diff --git a/ash/wm/app_list_controller.cc b/ash/wm/app_list_controller.cc |
| index e4cd957c39258adc24503afe786952ee1e49522f..1db06095b6be9ae3c32f7fdcc10ea2c77717c72f 100644 |
| --- a/ash/wm/app_list_controller.cc |
| +++ b/ash/wm/app_list_controller.cc |
| @@ -289,6 +289,9 @@ void AppListController::ScheduleAnimation() { |
| } |
| void AppListController::ProcessLocatedEvent(ui::LocatedEvent* event) { |
| + if (!view_ || !is_visible_) |
| + return; |
| + |
| // If the event happened on a menu, then the event should not close the app |
| // list. |
| aura::Window* target = static_cast<aura::Window*>(event->target()); |
| @@ -307,16 +310,9 @@ void AppListController::ProcessLocatedEvent(ui::LocatedEvent* event) { |
| } |
| } |
| - if (view_ && is_visible_) { |
| - 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, window); |
| - } |
| + aura::Window* window = view_->GetWidget()->GetNativeView(); |
|
sky
2014/02/24 21:04:38
Is the coordinate system here right?
sadrul
2014/02/24 21:10:16
The altered code doesn't actually deal with coordi
sky
2014/02/24 21:11:38
Indeed. The old code was doing conversions though.
|
| + if (!window->Contains(target)) |
| + SetVisible(false, window); |
| } |
| void AppListController::UpdateBounds() { |