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

WaylandBackend: Fix scale equation and unscale libdecor frame commit #1630

Merged

Conversation

ColinKinloch
Copy link

@ColinKinloch ColinKinloch commented Nov 15, 2024

This fixes the issue where in a scaled wayland sessions the window buffer is the correct size with window decorations that are too large.

The frame issue effects compositors that don't support server side decoration.

before after
Screenshot From 2024-11-15 22-41-16 Screenshot From 2024-11-15 22-41-46

It also fixes gamescope being having a couple of pixels smaller when fullscreen with 105% scaling.

fixes #1536, fixes #1620

@matte-schwartz
Copy link

matte-schwartz commented Nov 15, 2024

Doesn't seem to fix #1536 for me on Plasma 6.2.3 Wayland. Still a sliver at the very bottom and to the right side at 175% that isn't present at 150%

175%

image

150%

image

edit:

gamescope -f -- vkcube with my monitor set to 7680x2160p@240hz, Scaling 175% is my setup for reference

@ColinKinloch
Copy link
Author

Ah, I didn't read the issue properly sorry.

This fixes the issue where in a scaled wayland sessions the window
buffer is the correct size with window decorations that are too large.

It also fixes gamescope being having a couple of pixels smaller when
fullscreen.
@ColinKinloch ColinKinloch force-pushed the fractional_scale_libdecor_fix branch from 2f28661 to 6503630 Compare November 23, 2024 16:45
@ColinKinloch ColinKinloch changed the title WaylandBackend: Unscale for libdecor frame commit WaylandBackend: Fix scale equation and unscale libdecor frame commit Nov 23, 2024
@ColinKinloch
Copy link
Author

@matte-schwartz I replicated this today with 105% scaling which was causing the surface to be 1 pixel too small and 1 pixel offset.
I've updated the branch, could you check if it fixes your problem?

@matte-schwartz
Copy link

@ColinKinloch that does indeed solve #1536 on my end, nice work!

@matte-schwartz
Copy link

this PR also seems to fix #1620

@th3raid0r
Copy link

this PR also seems to fix #1620

A quick second confirmation here. This indeed fixes #1620 .

@misyltoad
Copy link
Collaborator

Thanks!

@misyltoad misyltoad merged commit 37a348b into ValveSoftware:master Nov 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants