diff options
author | Anu Aliyas <anu.aliyas@qt.io> | 2024-02-05 14:10:03 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2024-06-05 12:41:11 +0000 |
commit | b0032ab7a3d82ab96e0f629dc7f671f1c9a48daf (patch) | |
tree | 0695088f88f955025b08eb8fa2dadbcee08f0057 /examples/webenginewidgets/maps/doc | |
parent | 80d5821aa6ad2b3aa1d3a4108cf4030ae325837a (diff) |
Reset wheel_widget when forwarding unhandled mouse event6.5
If QApplicationPrivate::wheel_widget is present all wheel events are
forwarded to the wheel widget. If the wheel widget doesn't handle the
event, it is forwarded to the parent widget. With QtWebEngine in
the picture, all the mouse wheel events are forwarded to Chromium.
If Chromium doesn't handle the event, QtWebEngine will send the
unhandled mouse wheel event to the parent using qApp->sendEvent().
This operation is performed asynchronously. There is no immediate way
to determine whether QtWebEngine is going to handle the event.
If QApplicationPrivate::wheel_widget is not null, the mouse wheel handling
logic will forward the unhandled event back to the wheel_widget
which is QtWebEngine in this case leading to QtWebEngine grabbing all
mouse wheel events. Also there is no way to get proper phase
information from the Chromium, and the unhandled events are forwarded
with Qt::NoScrollPhase. QApplicationPrivate::wheel_widget is set to
nullptr to avoid the crash.
Fixes: QTBUG-121359
Change-Id: I01fef5605c264fdc97df041d57dc3589aa17c49f
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 9f247e3067113bc47b5e2635bc0b4dc69f8289f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 6794e5bdacc0324aea25b323268e126ab634eafc)
Diffstat (limited to 'examples/webenginewidgets/maps/doc')
0 files changed, 0 insertions, 0 deletions