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

Unified Diff: ui/events/ozone/evdev/tablet_event_converter_evdev.cc

Issue 889673004: ozone: evdev: Use kernel timestamps for mouse events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase error Created 5 years, 10 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 | « ui/events/ozone/evdev/tablet_event_converter_evdev.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/tablet_event_converter_evdev.cc
diff --git a/ui/events/ozone/evdev/tablet_event_converter_evdev.cc b/ui/events/ozone/evdev/tablet_event_converter_evdev.cc
index 49788763c00743cbbcd2e21afb3362f108c08425..24b01fcf0ac0fcf20f994e84e9ab1f34d9600514 100644
--- a/ui/events/ozone/evdev/tablet_event_converter_evdev.cc
+++ b/ui/events/ozone/evdev/tablet_event_converter_evdev.cc
@@ -68,7 +68,7 @@ void TabletEventConverterEvdev::ProcessEvents(const input_event* inputs,
ConvertAbsEvent(input);
break;
case EV_SYN:
- FlushEvents();
+ FlushEvents(input);
break;
}
}
@@ -145,10 +145,11 @@ void TabletEventConverterEvdev::DispatchMouseButton(const input_event& input) {
bool down = input.value;
dispatcher_->DispatchMouseButtonEvent(MouseButtonEventParams(
- id_, cursor_->GetLocation(), button, down, false /* allow_remap */));
+ id_, cursor_->GetLocation(), button, down, false /* allow_remap */,
+ TimeDeltaFromInputEvent(input)));
}
-void TabletEventConverterEvdev::FlushEvents() {
+void TabletEventConverterEvdev::FlushEvents(const input_event& input) {
if (!cursor_)
return;
@@ -163,8 +164,8 @@ void TabletEventConverterEvdev::FlushEvents() {
UpdateCursor();
- dispatcher_->DispatchMouseMoveEvent(
- MouseMoveEventParams(id_, cursor_->GetLocation()));
+ dispatcher_->DispatchMouseMoveEvent(MouseMoveEventParams(
+ id_, cursor_->GetLocation(), TimeDeltaFromInputEvent(input)));
abs_value_dirty_ = false;
}
« no previous file with comments | « ui/events/ozone/evdev/tablet_event_converter_evdev.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698