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

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

Issue 1294523004: ozone: Handle pressure and tilt for stylus devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new-pe-details
Patch Set: Address spang@ feedback Created 5 years, 4 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/input_injector_evdev.cc
diff --git a/ui/events/ozone/evdev/input_injector_evdev.cc b/ui/events/ozone/evdev/input_injector_evdev.cc
index 7c37fe921075723e89e068939de9f1d22f520f1f..bf73f9ad3f37616f12601487e14c2c5c00f444d2 100644
--- a/ui/events/ozone/evdev/input_injector_evdev.cc
+++ b/ui/events/ozone/evdev/input_injector_evdev.cc
@@ -47,7 +47,9 @@ void InputInjectorEvdev::InjectMouseButton(EventFlags button, bool down) {
dispatcher_->DispatchMouseButtonEvent(MouseButtonEventParams(
kDeviceIdForInjection, cursor_->GetLocation(), code, down,
- false /* allow_remap */, EventTimeForNow()));
+ false /* allow_remap */, EventPointerType::POINTER_TYPE_MOUSE,
+ /* force */ 0.0f, /* tilt_x */ 0.0f, /* tilt_y */ 0.0f,
+ EventTimeForNow()));
}
void InputInjectorEvdev::InjectMouseWheel(int delta_x, int delta_y) {
@@ -62,8 +64,11 @@ void InputInjectorEvdev::MoveCursorTo(const gfx::PointF& location) {
cursor_->MoveCursorTo(location);
- dispatcher_->DispatchMouseMoveEvent(MouseMoveEventParams(
- kDeviceIdForInjection, cursor_->GetLocation(), EventTimeForNow()));
+ dispatcher_->DispatchMouseMoveEvent(
+ MouseMoveEventParams(kDeviceIdForInjection, cursor_->GetLocation(),
+ EventPointerType::POINTER_TYPE_MOUSE,
+ /* force */ 0.0f, /* tilt_x */ 0.0f,
+ /* tilt_y */ 0.0f, EventTimeForNow()));
}
void InputInjectorEvdev::InjectKeyEvent(DomCode physical_key,

Powered by Google App Engine
This is Rietveld 408576698