Skip to content

Conversation

@Zamundaaa
Copy link

For details see https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/149, but effectively the protocol allows compositor and client to talk in pixels instead of logical coordinates, allowing games to run at native resolution.

@Zamundaaa Zamundaaa force-pushed the work/fractional-scaling branch from 9fd0506 to 82f00ba Compare November 6, 2022 16:34
@vyivel
Copy link

vyivel commented Nov 6, 2022

Fallback decorations use pre-scaled window->wl.{width,height} for sizes, but don't send the factor itself.

image

@Zamundaaa Zamundaaa force-pushed the work/fractional-scaling branch from 82f00ba to 32d7f3a Compare November 7, 2022 00:02
@Zamundaaa
Copy link
Author

Fallback decorations should now be correct

@theofficialgman
Copy link

any updates on this?

@Zamundaaa
Copy link
Author

Due to time constraints I've paused work on the protocol and implementations for now. It'll probably be a few months before I continue working on it.

@elmindreda elmindreda self-assigned this Feb 17, 2023
@elmindreda elmindreda added Wayland enhancement Feature suggestions and PRs High DPI High resolution display specific labels Feb 17, 2023
@theofficialgman
Copy link

theofficialgman commented Feb 18, 2023

@Zamundaaa set_scale_factor is NOT part of the v1 protocol that was merged and implemented. https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/143
please rework to function with v1 of the protocol if possible

it is part of the v2 protocol that as of now is unmerged and not implemented anywhere:
the PR name is wrong, this is v2 https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/149
protocol xml is v2 staging/fractional-scale/fractional-scale-v2.xml

@Zamundaaa
Copy link
Author

I know, I'm the author of the now-v2 protocol. You're right though, the title of this needs updating

@Zamundaaa Zamundaaa changed the title implement support for wp-fractional-scale-v1 implement support for wp-fractional-scale-v2 Feb 18, 2023
@theofficialgman
Copy link

theofficialgman commented Feb 18, 2023

maybe I am missing something but isn't the fractional scaling protocol supposed to allow for rendering at the native monitor resolution?

with kwin wayland 5.27 (fractional scaling v1 implemented) and the decoration fallbacks from this PR removed (so it can build and be used), my scaling factor is 1.5, and my native monitor resolution is 3840x2160, but I am rendering at 2560x1440 with this PR

@theofficialgman
Copy link

I am also here to report that cursor is broken in minecraft with this PR applied to master. works correctly on wayland (building with wayland, no x11) without this PR

@Zamundaaa
Copy link
Author

Zamundaaa commented Feb 18, 2023

This PR is not compatible with the v1 protocol, it will cause wrong behavior. It's really not ready for testing until I pick up work on the v2 protocol again and update this PR for it

@Zamundaaa Zamundaaa marked this pull request as draft February 18, 2023 01:58
@elmindreda
Copy link
Member

Just dropping in to say that I do want GLFW to support this protocol and also that you don't need to keep this rebased and current for it to be reviewed and accepted when I get the time to do so. There's likely going to be a lot of changes in the Wayland code soon but the automated merge status going red will not affect whether it's merged (although if you prefer to do the rebase yourself, please let me know).

@Zamundaaa
Copy link
Author

thanks. I would prefer to rebase it myself once I continue working on it, but I'll ask for help with that if needed

@elmindreda
Copy link
Member

Hello again, I'm about to implement support for fractional-scale-v1. Is fractional-scale-v2 still under development and if so is there anything in particular I should be mindful of when implementing support for v1?

@Zamundaaa
Copy link
Author

Yes. After we found some fun problems coming down to the fractional-scale-v1 approach in recent KWin development, I'm picking up v2 again. For implementing v1, as long as you keep the v1 protocol optional there shouldn't be any additional hurdles for implementing v2.

To potentially save you some time with v1, if you're testing the implementation on Gnome, if you see gaps and/or overlaps between the window content and the decoration, that is sadly expected with some scale factor + window size combinations. v1 is incompatible with subsurfaces and thus libdecor's approach to client side decorations.

@Zamundaaa Zamundaaa force-pushed the work/fractional-scaling branch 2 times, most recently from f63c35d to 4bf530c Compare October 20, 2025 15:17
@Zamundaaa Zamundaaa force-pushed the work/fractional-scaling branch from 4bf530c to 00498c7 Compare October 20, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature suggestions and PRs High DPI High resolution display specific Wayland

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants