-
Notifications
You must be signed in to change notification settings - Fork 901
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
BF: Mouse coordinate mapping on retina displays #4755
Conversation
Unfortunately this doesn't work on retina :( When I run this experiment: |
I think I needed to apply these changes to the pyglet backend directly since it handles coordinates differently and overrides the underlying conversion methods of the base class. Hope it works now! |
Converted to a draft, don't pull in until we confirm this fixes the issue across different Mac configurations (i.e. retina/non-retina). |
It works on my retina screen! I'll figure out what this textbox glyph test bug is and submit a separate PR for it |
Codecov Report
@@ Coverage Diff @@
## release #4755 +/- ##
===========================================
+ Coverage 45.32% 45.33% +0.01%
===========================================
Files 294 294
Lines 58845 58849 +4
Branches 10393 10393
===========================================
+ Hits 26671 26682 +11
+ Misses 29793 29784 -9
- Partials 2381 2383 +2
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
Fixes the issue that mouse coordinates are incorrectly mapped to window coordinates on macOS. Tested on the office Mac here without a retina display (same problem as before), need someone to check on a real retina display if the fix works there too.
Furthermore, the fix should apply to HiDPI displays on other platforms too since we're using the new
setContentScaleFactor()
method which generalizes mapping between window and framebuffer coordinates in cases where they differ in size.