Skip to content

Deduplicate drag handling from touch events - #92

Open
paufau wants to merge 1 commit into
SpyrexDE:godot-4from
paufau:godot-4
Open

Deduplicate drag handling from touch events#92
paufau wants to merge 1 commit into
SpyrexDE:godot-4from
paufau:godot-4

Conversation

@paufau

@paufau paufau commented Aug 13, 2026

Copy link
Copy Markdown

Fixes: #90

Solution:
Makes only actual screen InputEventScreenDrag to contribute to scrolling, omitting events from simulated mouse motion, so in this this condition:

if (event is InputEventScreenDrag and drag_with_touch) \
			or (event is InputEventMouseMotion and drag_with_mouse):
			or (event is InputEventMouseMotion and drag_with_mouse and not is_touch_dragging):

only (event is InputEventScreenDrag and drag_with_touch) is handling touch dragging. That fixes the duplicated handling

@paufau paufau changed the title Exclude drag handling from touch events Deduplicate drag handling from touch events Aug 13, 2026
@paufau

paufau commented Aug 30, 2026

Copy link
Copy Markdown
Author

Hey @SpyrexDE, do you think it is possible to merge the fix?

Please let me know if it requires more thought or testing, I'd be happy to help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drag input is applied twice on touch devices

1 participant