Skip to content

wayland: Support wp-fractional-scale-v1 protocol#5906

Merged
flibitijibibo merged 1 commit intolibsdl-org:mainfrom
davidedmundson:work/fractional_scale
Nov 29, 2022
Merged

wayland: Support wp-fractional-scale-v1 protocol#5906
flibitijibibo merged 1 commit intolibsdl-org:mainfrom
davidedmundson:work/fractional_scale

Conversation

@davidedmundson
Copy link
Copy Markdown
Contributor

A pending protocol adds support for more native communication of
fractional scaling.

Everything in the wayland backend already existed only the fractional
scale was calculated implicitly through a combination of output size
guesswork.

The new protocol makes that explicit. I have left the old code in place
for now.

draft because:

  1. it needs more testing. Volunteers please!
  2. the protocol is not yet landed, which is a chicken and egg with
    approval here

Description

Existing Issue(s)

@davidedmundson davidedmundson force-pushed the work/fractional_scale branch from 0808a09 to 20e5c1b Compare July 11, 2022 18:34
@flibitijibibo
Copy link
Copy Markdown
Collaborator

Going to CC @Kontrabant on this one, since I didn't do very much with fractional scaling. Separate from that this looks fine, so whatever the protocols group locks in I'm sure we'll be able to handle it.

@Kontrabant
Copy link
Copy Markdown
Contributor

Looks good at first glance to me as well. This protocol has been wanted for a while by a lot of people, so hopefully it will be finalized sooner rather than later.

@davidedmundson
Copy link
Copy Markdown
Contributor Author

Link to upstream wayland discussions: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/143

@flibitijibibo
Copy link
Copy Markdown
Collaborator

Marked this as 3.0, but if by some chance the protocol gets merged before tag this should be a really safe patch to roll in.

@flibitijibibo flibitijibibo changed the title DRAFT: Support wayland fractional scale protocol [Wayland] Support wp_fractional_scale_v1 protocol Oct 30, 2022
@flibitijibibo flibitijibibo changed the title [Wayland] Support wp_fractional_scale_v1 protocol wayland: Support wp-fractional-scale-v1 protocol Oct 30, 2022
@davidedmundson davidedmundson force-pushed the work/fractional_scale branch 3 times, most recently from ba9d765 to 22ba8be Compare November 7, 2022 16:01
@flibitijibibo flibitijibibo self-assigned this Nov 17, 2022
@flibitijibibo flibitijibibo marked this pull request as ready for review November 23, 2022 18:42
@flibitijibibo
Copy link
Copy Markdown
Collaborator

The protocol was approved this morning, so marking this as ready for review. @davidedmundson: Should we merge this after the protocol is merged or after the version is tagged? Do we expect any changes to be made in between those milestones?

@flibitijibibo flibitijibibo mentioned this pull request Nov 23, 2022
@flibitijibibo flibitijibibo modified the milestones: 3.x, 2.28.0 Nov 23, 2022
@davidedmundson
Copy link
Copy Markdown
Contributor Author

The protocol was approved this morning, so marking this as ready for review.

I forgot to post that I finally did some more extensive testing. I have one tiny issue with fullscreen to follow up on where the older path and this conflict in one specific chain. I'll sort it soon.

@davidedmundson: Should we merge this after the protocol is merged or after the version is tagged? Do we expect any changes to be made in between those milestones?

It's extremely unlikely to change, but if SDL got released with this and then there was a binary incompatiable modification to the protocol before wayland-protocols release the ramifications would be huge. For that reason I would err on the side of waiting.

@Kontrabant
Copy link
Copy Markdown
Contributor

Kontrabant commented Nov 23, 2022

Plus, it's going to take a little while for compositors to roll out new stable versions with support for it and the next SDL release is a way off, so there's no real reason to rush it through. They seem to tag new releases pretty quickly when a new protocol is approved anyways.

Copy link
Copy Markdown
Contributor

@Kontrabant Kontrabant left a comment

Choose a reason for hiding this comment

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

Little fix due to a change since the first version of this patch, but otherwise still LGTM.

@davidedmundson davidedmundson force-pushed the work/fractional_scale branch 2 times, most recently from d3affff to 0f6dbf4 Compare November 24, 2022 12:03
Copy link
Copy Markdown
Collaborator

@flibitijibibo flibitijibibo left a comment

Choose a reason for hiding this comment

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

Latest lgtm. Once the final xml is tagged in a release we should be able to merge this into both SDL3 and SDL2!

@flibitijibibo
Copy link
Copy Markdown
Collaborator

Protocol got merged this morning! @davidedmundson, if you have time: Definitely make an updated commit with the final commit/protocol text, and as soon as the tag is out I should be able to merge (assuming nothing changes between now and tag).

@Kontrabant
Copy link
Copy Markdown
Contributor

wayland-protocols 1.31 is now tagged and officially released, so everything is ready.

@flibitijibibo
Copy link
Copy Markdown
Collaborator

🎉

@davidedmundson, once the commit message and protocol text are updated I'll merge this in!

The new protocol adds support for more native communication of
fractional scaling.

Everything in the wayland backend already existed only our fractional
scale was calculated implicitly through a combination of output size
guesswork for fullscreen windows.

This new protocol makes that explicit, providing a more robust solution
and a solution for non-fullscreen surfaces. The fallback code is still
left in place for now whilst compositors gain support.
@davidedmundson
Copy link
Copy Markdown
Contributor Author

I filed a bug on the existing issue I found: #6707 but as I said it's pre-existing.

I'll try and find time to fix it if no-one beats me to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants