Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-3_0] Re-introduce a timer to avoid finger hover / stylus interference #4757

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/qml/qgismobileapp.qml
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,8 @@ ApplicationWindow {
}

onHoveredChanged: {
if (skipHover) {
skipHover = hovered
if ( skipHover ) {
dummyHoverTimer.restart()
return
}

Expand All @@ -414,7 +414,17 @@ ApplicationWindow {
/* The second hover handler is a workaround what appears to be an issue with
* Qt whereas synthesized mouse event would trigger the first HoverHandler even though
* PointerDevice.TouchScreen was explicitly taken out of the accepted devices.
* The timer is needed as adding additional fingers onto a device re-triggers hovered
* changes in unpredictable order.
*/
Timer {
id: dummyHoverTimer
interval: 100
repeat: false

onTriggered: hoverHandler.skipHover = hoverHandler.hovered
}

HoverHandler {
id: dummyHoverHandler
enabled: !qfieldSettings.mouseAsTouchScreen
Expand Down
Loading