[Windowing] Fix regression for resolution label #23371
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This fixes a regression caused by #23259 on platforms such as Linux and Android. We were using the resolution id as the label but it turns out on those platforms the id is already being used for other purposes, see #23259 (comment)
Hence in this PR we introduce a label property we are free to set from the windowing system for UI display purposes (e.g. when we select the resolution in the display settings) that takes precedence over the label that is created with the resolution internal properties (width, height, etc). We still match setting selection by ID but decouple the label from the id.
Motivation and context
Regression fix, restore same functionality as before.
How has this been tested?
Runtime tested in MacOS (source of the feature) and tested by @joseluismarti on other platforms
What is the effect on users?
Restore previous functionality
Types of change
Checklist: