diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2019-08-30 18:01:06 +0200 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2019-09-05 14:02:31 +0000 |
commit | 9af3b1bf632534732142388c9b771bc7384e3fc7 (patch) | |
tree | d6d07d4ba44ed49bd80baac6583293d85003597a | |
parent | feccbb4ea7fa685dcd013f5a3f6c14ea768636c9 (diff) | |
download | qtwebengine-chromium-9af3b1bf632534732142388c9b771bc7384e3fc7.tar.gz |
Fix pressure of tablet events
Incoming tablet events are forwarded as mouse events to Chromium,
because its pointer event unification is still WIP. The following
change introduced a behavior which sets the pressure property to 0
when no button is pressed:
https://chromium-review.googlesource.com/c/chromium/src/+/626039/
This is acceptable for mouse events, but breaks our tablet support.
Revert this until Chromium has a proper API and support of tablet
events.
Change-Id: Ieeffd22fc9337df342367826e39286352c6ba43b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | chromium/third_party/blink/renderer/core/events/pointer_event_factory.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chromium/third_party/blink/renderer/core/events/pointer_event_factory.cc b/chromium/third_party/blink/renderer/core/events/pointer_event_factory.cc index 3234509b6d1..5b5d123be5d 100644 --- a/chromium/third_party/blink/renderer/core/events/pointer_event_factory.cc +++ b/chromium/third_party/blink/renderer/core/events/pointer_event_factory.cc @@ -117,7 +117,12 @@ void UpdateCommonPointerEventInit(const WebPointerEvent& web_pointer_event, pointer_event_init->setWidth(point_shape.Width()); pointer_event_init->setHeight(point_shape.Height()); } - pointer_event_init->setPressure(GetPointerEventPressure( +#if defined(TOOLKIT_QT) + if (web_pointer_event.pointer_type == WebPointerProperties::PointerType::kPen) + pointer_event_init->setPressure(web_pointer_event.force); + else +#endif + pointer_event_init->setPressure(GetPointerEventPressure( web_pointer_event.force, pointer_event_init->buttons())); pointer_event_init->setTiltX(web_pointer_event.tilt_x); pointer_event_init->setTiltY(web_pointer_event.tilt_y); |