Skip to content
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

Wayland: Improve compositor compatibility by allowing older globals #91196

Merged
merged 1 commit into from
Apr 29, 2024

Conversation

Riteo
Copy link
Contributor

@Riteo Riteo commented Apr 26, 2024

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_outputs or newer wl_pointers).

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:

Object Name Minimum Version Accepted Maximum Version Implemented Mandatory? Notes
wl_compositor 1 6 y surface creation
xdg_wm_base 1 6 y desktop windows
wl_shm 1 1 y cursor buffer handling
wl_data_device_manager 1 3 n clipboard and drag&drop
wl_output 1 4 n screen info, can be registered multiple times
wl_seat 1 9 n basic input, can be registered multiple times
wp_viewporter 1 1 n buffer "stretching", fractional scaling dependency
wp_fractional_scale_manager_v1 1 1 n fractional scaling
zwp_primary_selection_device_manager_v1 1 1 n primary clipboard
zwp_pointer_constraints_v1 1 1 n pointer constraints
zwp_relative_pointer_manager_v1 1 1 n relative pointer input, especially useful when paired with pointer constraints
zwp_pointer_gestures_v1 1 1 n touchpad gestures
zwp_tablet_manager_v2 1 1 n drawing tablet support
zxdg_decoration_manager_v1 1 1 n manual server-side decorations handling (libdecor-less fallback)
zxdg_activation_v1 1 1 n attention requesting
zwp_idle_inhibit_manager_v1 1 1 n idle inibition (non-GNOME)
zxdg_exporter_v1 1 1 n dbus desktop integration

Much better I'd say :D

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 newer `wl_pointer`s).

While we're at it, this commit also fixes a few typos and naming inconsistencies
I found.
@akien-mga akien-mga merged commit d7340a0 into godotengine:master Apr 29, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

wayland cannot work with weston
2 participants