Skip to content

Rework ScriptThread::handle_input_event for behaviour and performance - #36619

Merged
jdm merged 1 commit into
servo:mainfrom
yezhizhen:fix-right-button
Apr 21, 2025
Merged

jdm merged 1 commit into
servo:mainfrom
yezhizhen:fix-right-button

Conversation

@yezhizhen

@yezhizhen yezhizhen commented Apr 20, 2025 •

Copy link
Copy Markdown
Member

Rework ScriptThread::handle_input_event for correct behaviour and better performance

  1. Only trigger click event with primary button, according to spec
  2. Avoid unnecessary clone of ConstellationInputEvent

This is a follow up of #36413

Testing: Manually tested. Right mouse won't trigger click event now.
Fixes: #35666
cc @jdm @xiaochengh

1. Only trigger click event with primary button
2. Avoid unnecessary clone of `ConstellationInputEvent`

Signed-off-by: Euclid Ye <[email protected]>
@yezhizhen
yezhizhen requested a review from gterzian as a code owner April 20, 2025 03:07
@jdm
jdm added this pull request to the merge queue Apr 21, 2025
Merged via the queue into servo:main with commit 990ed88 Apr 21, 2025
@yezhizhen
yezhizhen deleted the fix-right-button branch April 21, 2025 23:27
github-merge-queue Bot pushed a commit that referenced this pull request Apr 29, 2025
update doc for `ScriptThread::relative_mouse_down_point` which was
missing in #36619

Testing: No need as just updating docs

Signed-off-by: Euclid Ye <[email protected]>
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.

The click event should not be triggered by the right mouse button.

2 participants