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

Unified Diff: ash/shelf/shelf_widget.cc

Issue 883063003: Revert of Fix shelf dimming on secondary display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months 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 | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_widget.cc
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
index 96e75ce478ab819ff8c7b95e119871cf20770067..32262778e1f447660bc78d99c6319e944f9babda 100644
--- a/ash/shelf/shelf_widget.cc
+++ b/ash/shelf/shelf_widget.cc
@@ -36,7 +36,6 @@
#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"
@@ -214,11 +213,7 @@
if (event->type() != ui::ET_MOUSE_MOVED &&
event->type() != ui::ET_MOUSE_DRAGGED)
return;
-
- gfx::Point screen_point(event->location());
- ::wm::ConvertPointToScreen(static_cast<aura::Window*>(event->target()),
- &screen_point);
- bool inside = owner_->GetBoundsInScreen().Contains(screen_point);
+ bool inside = owner_->GetBoundsInScreen().Contains(event->root_location());
if (mouse_inside_ || touch_inside_ != inside || touch_inside_)
owner_->SetHovered(inside || touch_inside_);
mouse_inside_ = inside;
@@ -227,12 +222,8 @@
void DimmerView::DimmerEventFilter::OnTouchEvent(ui::TouchEvent* event) {
bool touch_inside = false;
if (event->type() != ui::ET_TOUCH_RELEASED &&
- 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);
- }
+ event->type() != ui::ET_TOUCH_CANCELLED)
+ touch_inside = owner_->GetBoundsInScreen().Contains(event->root_location());
if (mouse_inside_ || touch_inside_ != mouse_inside_ || touch_inside)
owner_->SetHovered(mouse_inside_ || touch_inside);
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698