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

Fix the rounding of the size of fractionally scaled monitors #5748

Merged
merged 1 commit into from Apr 25, 2024

Conversation

eriedaberrie
Copy link
Contributor

Describe your PR, what does it fix/add?

This fixes the issue of some monitors with fractional scaling having their vecSize 1 pixel less than they should be. In my case, my 2560x1600 monitor with 1.33x scaling would end up with dimensions 1919.999...x1119.999..., which would then get floored to 1919x1119. This caused a 1-pixel outline around the edges of the monitor where nothing happened (very visible if I set background_color to 0x00ff0000 or something and fullscreened anything or had a dark wallpaper. The problem would be exacerbated if external monitors are positioned with auto, because due to the incorrect vecSize the monitors would end up actually overlapping by a single pixel. This would cause all sorts of problems like vfr breaking on certain fullscreened apps (firefox in particular) and also popup menus not working on fullscreened apps for some reason.

Fixes:
#3511
#3778
#4474
#4781
and possibly #5399 (not sure if related)

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

I'm not sure if this is the right way to go about this and it might still have problems if there is no clean divisor for the scaling factor but it's better than nothing I think.

Is it ready for merging, or does it need work?

Seems ready to me.

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh man, right. Thanks

@YourSandwich
Copy link

YourSandwich commented May 19, 2024

This causes some notifications like Steam Notifications to be slightly cut off at the bottom.
Edit: I did not test is yet, but it is a regression from 39.1 and this merge could likely be the cause of it.

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.

None yet

3 participants