-
Notifications
You must be signed in to change notification settings - Fork 187
[Win32] Apply accessibility setting to ImageDataProvider-based cursor #2811
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
base: master
Are you sure you want to change the base?
[Win32] Apply accessibility setting to ImageDataProvider-based cursor #2811
Conversation
Test Results 118 files ±0 118 suites ±0 16m 1s ⏱️ -14s Results for commit 6b11707. ± Comparison against base commit a0d6ffc. This pull request skips 1 test.♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine for the sake of consistency. There just seems to be one minor issue (which also happens with the other providers) that the image data is not updated when the scale factor is changed. Though I think that's best handled separately.
If I understand everything correctly, the cache stores the handle by monitor zoom level, even though the monitor zoom * scale factor would probably make more sense.
|
Failures are due to
That's indeed a separate issue. As you say, it would probably make sense to include the accessibility scale factor into the handle map key and it should work then. |
akoch-yatta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change is small and straightforward. I tested it with different cursors and accessibility settings and it worked as expected.
The change does not introduce a noticeable regression risk but provides a way better UX with accessibility settings
|
We propose to merge this for RC2. According to the comments and arguments, we consider the change of low risk while it will improve the user experience for use cases of custom cursors. As mentioned in #2811 (comment), the failing checks are due to the preexisting @iloveeclipse @akurtakov @merks what do think from PL/PMC perspective? If you agree to bring this into the release, it would be great to have your PL/PMC+1. |
|
PMC+1 I trust that you folks have all the necessary expertise to make the best technical decisions for the good of the project. |
|
I must confess the change looks non trivial for me, but I have no idea about Windows / SWT specific zoom handling. |
Thank you for the feedback!
|
Cursors are scaled according to the accessibility settings of Windows. However, this setting is only applied to Cursor instances based on image data but not on those that are instantiated via an ImageDataProvider. This change also applies the scale factor in the latter case.
8d5bed2 to
6b11707
Compare
|
I investigated the change again and found that the check against |
Cursors are scaled according to the accessibility settings of Windows. However, this setting is only applied to Cursor instances based on image data but not on those that are instantiated via an ImageDataProvider. This change also applies the scale factor in the latter case.
See:
I consider this a safe change as it is simply an oversight in the existing implementation. The change has no effect in case the accessibility setting of Windows is not used. In case it is used, the quality of custom cursors based on an ImageDataProvider (as an example and in particuar for GEF) will have a better user experience.
This is why I would be in favor of still bringing this into the upcoming releae / RC2, even though we are already very late.
How to test
Change the accessibility settings for the mouse cursor size in the Windows settings and check with any custom cursor that uses an

ImageDataProvider, such as the shared cursors of GEF.Before
cursor_before.mp4
After
cursor_after.mp4
This is basically a follow up to the following PR which applied the accessibility setting to the image-data-based construction of cursors: