Skip to content

Fix BaseButton multitouch signals firing for only 1 button - #118608

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
shiena:fix/118581-multitouch-button-signals
Apr 16, 2026
Merged

Fix BaseButton multitouch signals firing for only 1 button#118608
Repiteo merged 1 commit into
godotengine:masterfrom
shiena:fix/118581-multitouch-button-signals

Conversation

@shiena

@shiena shiena commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Fixes #118581.

Regression from #110893.

Multitouch button_down / button_up signals only fired for one button at a time. When a second
InputEventScreenTouch press arrived on another button, on_action_event() rejected it because
status.hovering is only set by mouse motion and the event was not treated as an accept event, so
status.press_attempt never became true and no signal was emitted.

Also accept the press when the touch event targets a button whose pressing_inside is already true
(i.e. the touch that started inside the button's rect), so each button processes its own touch stream
independently and multiple buttons can emit button_down / button_up simultaneously.

  • Verified on iOS Safari with a Web export of the MRP, pressing 4 buttons simultaneously with 4 fingers.

    multitouch.mp4
  • Verified on Android Chrome

    multitouch-android.mp4

@shiena
shiena requested a review from a team as a code owner April 15, 2026 12:48
@Nintorch Nintorch added this to the 4.7 milestone Apr 15, 2026

@m4gr3d m4gr3d left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated that the fix resolves the issue in #116716 where multiple buttons cannot be pressed at the same time.

@Alex2782 Alex2782 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Tested on Android and macOS

@Repiteo
Repiteo merged commit 070d9a4 into godotengine:master Apr 16, 2026
20 checks passed
@Repiteo

Repiteo commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Thanks!

@shiena
shiena deleted the fix/118581-multitouch-button-signals branch April 16, 2026 15:20
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
…ch-button-signals

Fix BaseButton multitouch signals firing for only 1 button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BaseButton: multitouch support, down and up events are triggered for a maximum of 1 Button.

5 participants