| Index: ash/shelf/shelf_widget.cc
|
| diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
|
| index 32262778e1f447660bc78d99c6319e944f9babda..96e75ce478ab819ff8c7b95e119871cf20770067 100644
|
| --- a/ash/shelf/shelf_widget.cc
|
| +++ b/ash/shelf/shelf_widget.cc
|
| @@ -36,6 +36,7 @@
|
| #include "ui/views/accessible_pane_view.h"
|
| #include "ui/views/widget/widget.h"
|
| #include "ui/views/widget/widget_delegate.h"
|
| +#include "ui/wm/core/coordinate_conversion.h"
|
| #include "ui/wm/core/easy_resize_window_targeter.h"
|
| #include "ui/wm/public/activation_client.h"
|
|
|
| @@ -213,7 +214,11 @@ void DimmerView::DimmerEventFilter::OnMouseEvent(ui::MouseEvent* event) {
|
| if (event->type() != ui::ET_MOUSE_MOVED &&
|
| event->type() != ui::ET_MOUSE_DRAGGED)
|
| return;
|
| - bool inside = owner_->GetBoundsInScreen().Contains(event->root_location());
|
| +
|
| + gfx::Point screen_point(event->location());
|
| + ::wm::ConvertPointToScreen(static_cast<aura::Window*>(event->target()),
|
| + &screen_point);
|
| + bool inside = owner_->GetBoundsInScreen().Contains(screen_point);
|
| if (mouse_inside_ || touch_inside_ != inside || touch_inside_)
|
| owner_->SetHovered(inside || touch_inside_);
|
| mouse_inside_ = inside;
|
| @@ -222,8 +227,12 @@ void DimmerView::DimmerEventFilter::OnMouseEvent(ui::MouseEvent* event) {
|
| void DimmerView::DimmerEventFilter::OnTouchEvent(ui::TouchEvent* event) {
|
| bool touch_inside = false;
|
| if (event->type() != ui::ET_TOUCH_RELEASED &&
|
| - event->type() != ui::ET_TOUCH_CANCELLED)
|
| - touch_inside = owner_->GetBoundsInScreen().Contains(event->root_location());
|
| + event->type() != ui::ET_TOUCH_CANCELLED) {
|
| + gfx::Point screen_point(event->location());
|
| + ::wm::ConvertPointToScreen(static_cast<aura::Window*>(event->target()),
|
| + &screen_point);
|
| + touch_inside = owner_->GetBoundsInScreen().Contains(screen_point);
|
| + }
|
|
|
| if (mouse_inside_ || touch_inside_ != mouse_inside_ || touch_inside)
|
| owner_->SetHovered(mouse_inside_ || touch_inside);
|
|
|