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

Unified Diff: ui/events/event.cc

Issue 2033743003: Map ET_POINTER_MOVED to ET_MOUSE_DRAGGED when a mouse button is down. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | ui/events/event_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/event.cc
diff --git a/ui/events/event.cc b/ui/events/event.cc
index 8261fd9ce4cc5facce6d2dbf136c9f51574b9860..dcb63b3d0c5015124c52c847bb9ceb326936f430 100644
--- a/ui/events/event.cc
+++ b/ui/events/event.cc
@@ -472,7 +472,13 @@ MouseEvent::MouseEvent(const PointerEvent& pointer_event)
break;
case ET_POINTER_MOVED:
- SetType(ET_MOUSE_MOVED);
+ if (pointer_event.flags() &
+ (EF_LEFT_MOUSE_BUTTON | EF_MIDDLE_MOUSE_BUTTON |
+ EF_RIGHT_MOUSE_BUTTON)) {
+ SetType(ET_MOUSE_DRAGGED);
+ } else {
+ SetType(ET_MOUSE_MOVED);
+ }
break;
case ET_POINTER_ENTERED:
« no previous file with comments | « no previous file | ui/events/event_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698