Use double type for storing the display scaling factor in Wayland #1257
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One of my monitors has a resolution of 3840 x 2560. I have this set up with a scaling factor of 1.6x to achieve a comfortable widget size akin to that of a 30" 4k display at 1.5x scale. Unfortunately the
wl_fixedtype stores 1.6 as 1.6034somethingsomething (I can't remember the exact number). This results in an inaccurate scaled resolution (an additional 3 or so pixels in each dimension) on my funky monitor.The fix is to replace the
wl_fixedtyped withdoublein the wayland display server.I'm not sure if there's a better solution to this problem. Please advise if there is one - I'd be happy to implement it if so.