Wayland: Improve compositor compatibility by allowing older globals #91196
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.
Fixes #90612
Previously we pretty much hardcoded most of the globals we requested, causing compatibility issues with certain compositors like Weston, which support only some pretty old versions or miss some more advanced protocols.
To put fuel on the fire, we also errored out when certain protocols weren't available, despite us being able to boot a game just fine (but obviously with a degraded featureset).
The solution is to simply allow all the way from version 1 to the current latest, adding some compatibility code (such as for older
wl_output
s or newerwl_pointer
s).While we're at it, this commit also fixes a few typos and naming inconsistencies I found.
Edit: oh right, this also removes some initialization code for an unused global,
wl_subcompositor
.Bonus content
Here's a an updated version of the table I put in the above issue ticket:
wl_compositor
xdg_wm_base
wl_shm
wl_data_device_manager
wl_output
wl_seat
wp_viewporter
wp_fractional_scale_manager_v1
zwp_primary_selection_device_manager_v1
zwp_pointer_constraints_v1
zwp_relative_pointer_manager_v1
zwp_pointer_gestures_v1
zwp_tablet_manager_v2
zxdg_decoration_manager_v1
zxdg_activation_v1
zwp_idle_inhibit_manager_v1
zxdg_exporter_v1
Much better I'd say :D