-
Notifications
You must be signed in to change notification settings - Fork 3.1k
wayland_common: consider output rotations in --geometry and --autofit #16908
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?
Conversation
With 90° or 270° output rotations, make width and height in --geometry and --autofit* options refer to the dimensions after the rotation. e.g. --geometry=100%x100% will fill the screen instead of going beyond it.
|
Download the artifacts for this pull request: Windows |
|
The order of events is unspecified. However, mpv should in any case not use the mode since applications might not actually be able to expand to the entire mode when fractional scaling is used. If necessary, it should use the xdg_output dimensions (which already account for the output transform) and the fractional scale to calculate the maximum size in physical pixels. |
|
I don't understand how the maximum size lets us know if the output is rotated? |
|
There is no need to know if the output is rotated if you don't use the mode. |
|
Ok, so you mean to also replace the existing code getting the position and dimensions from the mode. However https://wayland.app/protocols/xdg-output-unstable-v1 is still unstable so I don't know if we should support both ways or wait for it to become stable. |
|
All wayland protocols are stable. As far as xdg_output is concerned, applications should not use it and neither should they use wl_output. But xdg_output is slightly less bad for this usecase. |
|
Well at least gamescope doesn't support xdg_output according to that page and it can be used for HDR passthrough with mpv. |
gamescope already can't because wp_viewporter is required for mpv but gamescope doesn't support it Though I think the x11vk context in mpv should work for it too, it implements its own WSI layer to get HDR metadata out somehow. So gamescope should not factor in here |
With 90° or 270° output rotations, make width and height in --geometry and --autofit* options refer to the dimensions after the rotation.
e.g. --geometry=100%x100% will fill the screen instead of going beyond it.
Not tested on multiple monitors.
Docs say to use
wl_surface.preferred_buffer_transform, but that is received after the window is already created.