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

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

Issue 2278033003: Revert of Add POINTER_TYPE_ERASER to EventPointerType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « ui/events/gestures/motion_event_aura.cc ('k') | ui/events/ozone/evdev/touch_event_converter_evdev.cc » ('j') | 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 869520f2f276f934fff486ac65886103fbf7eeb3..2ba5a7e2d4b90420969208cb071405d7ea5c8dd4 100644
--- a/ui/events/ozone/evdev/tablet_event_converter_evdev.cc
+++ b/ui/events/ozone/evdev/tablet_event_converter_evdev.cc
@@ -20,12 +20,6 @@
// Convert tilt from [min, min + num_values) to [-90deg, +90deg)
float ScaleTilt(int value, int min_value, int num_values) {
return 180.f * (value - min_value) / num_values - 90.f;
-}
-
-EventPointerType GetToolType(int button_tool) {
- if (button_tool == BTN_TOOL_RUBBER)
- return EventPointerType::POINTER_TYPE_ERASER;
- return EventPointerType::POINTER_TYPE_PEN;
}
} // namespace
@@ -186,7 +180,7 @@
dispatcher_->DispatchMouseButtonEvent(MouseButtonEventParams(
input_device_.id, EF_NONE, cursor_->GetLocation(), button, down,
false /* allow_remap */,
- PointerDetails(GetToolType(stylus_),
+ PointerDetails(EventPointerType::POINTER_TYPE_PEN,
/* radius_x */ 0.0f, /* radius_y */ 0.0f, pressure_,
tilt_x_, tilt_y_),
TimeTicksFromInputEvent(input)));
@@ -209,7 +203,7 @@
dispatcher_->DispatchMouseMoveEvent(MouseMoveEventParams(
input_device_.id, EF_NONE, cursor_->GetLocation(),
- PointerDetails(GetToolType(stylus_),
+ PointerDetails(EventPointerType::POINTER_TYPE_PEN,
/* radius_x */ 0.0f, /* radius_y */ 0.0f, pressure_,
tilt_x_, tilt_y_),
TimeTicksFromInputEvent(input)));
« no previous file with comments | « ui/events/gestures/motion_event_aura.cc ('k') | ui/events/ozone/evdev/touch_event_converter_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698