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

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

Issue 2700623003: Make sure that the pressure is always 0 for pointerup events (Closed)
Patch Set: pressure Created 3 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/x/events_x_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3b19c7ab64476fb4a31dde788ccc57f913d73cee..fa37616887cec9592fa12b42e0aecdb70c18de07 100644
--- a/ui/events/x/events_x_utils.cc
+++ b/ui/events/x/events_x_utils.cc
@@ -725,6 +725,9 @@ float GetTouchAngleFromXEvent(const XEvent& xev) {
}
float GetTouchForceFromXEvent(const XEvent& xev) {
+ XIDeviceEvent* event = static_cast<XIDeviceEvent*>(xev.xcookie.data);
+ if (event->evtype == XI_TouchEnd)
+ return 0.0;
double force = 0.0;
force = GetTouchParamFromXEvent(
xev, ui::DeviceDataManagerX11::DT_TOUCH_PRESSURE, 0.0);
« no previous file with comments | « ui/events/x/events_x_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698