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

Unified Diff: ui/views/widget/widget.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/widget/widget.cc
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index cfc6d59a39348753ceeb4e485781d13e0503c071..0949494b1e8d415d3fc7904cefbb69b823e60bef 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -1217,8 +1217,9 @@ void Widget::OnMouseEvent(ui::MouseEvent* event) {
if (root_view)
root_view->OnMouseDragged(*event);
} else if (!last_mouse_event_was_move_ ||
- last_mouse_event_position_ != event->location()) {
- last_mouse_event_position_ = event->location();
+ last_mouse_event_position_ !=
+ gfx::ToFlooredPoint(event->location())) {
+ last_mouse_event_position_ = gfx::ToFlooredPoint(event->location());
last_mouse_event_was_move_ = true;
if (root_view)
root_view->OnMouseMoved(*event);

Powered by Google App Engine
This is Rietveld 408576698