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

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: pointer 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..9fdd98f3d7665d86f4ee3075907d8a5afa462514 100644
--- a/ui/events/x/events_x_utils.cc
+++ b/ui/events/x/events_x_utils.cc
@@ -734,6 +734,9 @@ float GetTouchForceFromXEvent(const XEvent& xev) {
if (!ui::DeviceDataManagerX11::GetInstance()->NormalizeData(
deviceid, ui::DeviceDataManagerX11::DT_TOUCH_PRESSURE, &force))
force = 0.0;
+ XIDeviceEvent* event = static_cast<XIDeviceEvent*>(xev.xcookie.data);
+ if (event->evtype == XI_TouchEnd)
+ force = 0.0;
return force;
}
« 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