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

Unified Diff: ui/events/x/events_x_utils.cc

Issue 2933353003: Mark the ET_MOUSE_MOVED created from a pointer grab as synthesized. (Closed)
Patch Set: Just fail on mouse moves, failing on all mouse events is excessively strict. Created 3 years, 6 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/events/x/events_x_utils.cc
diff --git a/ui/events/x/events_x_utils.cc b/ui/events/x/events_x_utils.cc
index fa37616887cec9592fa12b42e0aecdb70c18de07..af656b4128087b57bf9f4a55ca92540d2e04f01c 100644
--- a/ui/events/x/events_x_utils.cc
+++ b/ui/events/x/events_x_utils.cc
@@ -474,6 +474,9 @@ int EventFlagsFromXEvent(const XEvent& xev) {
return flags;
}
case EnterNotify:
+ // EnterNotify creates ET_MOUSE_MOVED. Mark as synthesized as this is not
+ // a real mouse move event.
+ return GetEventFlagsFromXState(xev.xcrossing.state) | EF_IS_SYNTHESIZED;
case LeaveNotify:
return GetEventFlagsFromXState(xev.xcrossing.state);
case MotionNotify:

Powered by Google App Engine
This is Rietveld 408576698