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

Unified Diff: ui/events/ozone/evdev/event_factory_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: Rebase on MouseEvent timestamp changes & fix stime feedback 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
Index: ui/events/ozone/evdev/event_factory_evdev.cc
diff --git a/ui/events/ozone/evdev/event_factory_evdev.cc b/ui/events/ozone/evdev/event_factory_evdev.cc
index 65bf8ade67ae2afda1217c7adf1d21090417e94f..858f46355c8be0dba8af1649f6eab6a284bac9cb 100644
--- a/ui/events/ozone/evdev/event_factory_evdev.cc
+++ b/ui/events/ozone/evdev/event_factory_evdev.cc
@@ -154,7 +154,7 @@ void EventFactoryEvdev::DispatchKeyEvent(const KeyEventParams& params) {
void EventFactoryEvdev::DispatchMouseMoveEvent(
const MouseMoveEventParams& params) {
MouseEvent event(ui::ET_MOUSE_MOVED, params.location, params.location,
- EventTimeForNow(), modifiers_.GetModifierFlags(),
+ params.timestamp, modifiers_.GetModifierFlags(),
/* changed_button_flags */ 0);
event.set_source_device_id(params.device_id);
DispatchUiEvent(&event);
@@ -186,7 +186,7 @@ void EventFactoryEvdev::DispatchMouseButtonEvent(
modifiers_.UpdateModifier(modifier, params.down);
MouseEvent event(params.down ? ui::ET_MOUSE_PRESSED : ui::ET_MOUSE_RELEASED,
- params.location, params.location, EventTimeForNow(),
+ params.location, params.location, params.timestamp,
modifiers_.GetModifierFlags() | flag,
/* changed_button_flags */ flag);
event.set_source_device_id(params.device_id);
@@ -196,7 +196,7 @@ void EventFactoryEvdev::DispatchMouseButtonEvent(
void EventFactoryEvdev::DispatchMouseWheelEvent(
const MouseWheelEventParams& params) {
MouseWheelEvent event(params.delta, params.location, params.location,
- modifiers_.GetModifierFlags(),
+ params.timestamp, modifiers_.GetModifierFlags(),
0 /* changed_button_flags */);
event.set_source_device_id(params.device_id);
DispatchUiEvent(&event);
@@ -303,7 +303,8 @@ void EventFactoryEvdev::WarpCursorTo(gfx::AcceleratedWidget widget,
FROM_HERE, base::Bind(&EventFactoryEvdev::DispatchMouseMoveEvent,
weak_ptr_factory_.GetWeakPtr(),
MouseMoveEventParams(-1 /* device_id */,
- cursor_->GetLocation())));
+ cursor_->GetLocation(),
+ EventTimeForNow())));
}
int EventFactoryEvdev::NextDeviceId() {

Powered by Google App Engine
This is Rietveld 408576698