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

feat: update mouse selection at user's refresh rate #5717

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thennothinghappened
Copy link

Issue #, if available: #5716

Description of changes:
Rather than updating the mouse selection at a fixed interval of 20 milliseconds, I've changed it to use event.nextFrame(), which calls requestAnimationFrame(). This means that user selection is updated at their refresh rate, and thus results in a much smoother experience; this is especially noticeable on (but not limited to) high refresh-rate monitors.

I did note that there are many places within Ace where this fixed magic number of 20 is used, rather than hooking into the animation loop - these could also be made smoother by making similar adjustments.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Pull Request Checklist:

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.02%. Comparing base (ef08dfb) to head (514ef45).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5717   +/-   ##
=======================================
  Coverage   87.02%   87.02%           
=======================================
  Files         598      598           
  Lines       43593    43598    +5     
  Branches     7163     7164    +1     
=======================================
+ Hits        37936    37941    +5     
  Misses       5657     5657           
Flag Coverage Δ
unittests 87.02% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant