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

Unified Diff: ui/views/corewm/tooltip_controller.cc

Issue 139983009: ui::LocatedEvent location() returns gfx::PointF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo accidental change. Created 6 years, 8 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
Index: ui/views/corewm/tooltip_controller.cc
diff --git a/ui/views/corewm/tooltip_controller.cc b/ui/views/corewm/tooltip_controller.cc
index 500466fdf4d646c69ccba8f31c98ef85a8f9496c..d79a0d52b32fb71cfd1e96b7cf9a982565e791df 100644
--- a/ui/views/corewm/tooltip_controller.cc
+++ b/ui/views/corewm/tooltip_controller.cc
@@ -83,7 +83,7 @@ aura::Window* GetTooltipTarget(const ui::MouseEvent& event,
// If |target| has capture all events go to it, even if the mouse is
// really over another window. Find the real window the mouse is over.
- gfx::Point screen_loc(event.location());
+ gfx::Point screen_loc(gfx::ToFlooredPoint(event.location()));
aura::client::GetScreenPositionClient(event_target->GetRootWindow())->
ConvertPointToScreen(event_target, &screen_loc);
gfx::Screen* screen = gfx::Screen::GetScreenFor(event_target);
@@ -185,7 +185,7 @@ void TooltipController::OnMouseEvent(ui::MouseEvent* event) {
case ui::ET_MOUSE_EXITED:
case ui::ET_MOUSE_MOVED:
case ui::ET_MOUSE_DRAGGED: {
- curr_mouse_loc_ = event->location();
+ curr_mouse_loc_ = gfx::ToFlooredPoint(event->location());
aura::Window* target = GetTooltipTarget(*event, &curr_mouse_loc_);
SetTooltipWindow(target);
if (tooltip_timer_.IsRunning())

Powered by Google App Engine
This is Rietveld 408576698