wayland: remove has_wl_compositor_v6

We deviate slightly from the specification, in that we don't assume a
preferred buffer scale of 1. Instead, we "guess" the scale *until we
receive a surface_preferred_buffer_scale event.

Because of this, we don't need the has_wl_compositor_v6 member, as
it's enough to check if we have a non-zero 'preferred buffer scale'.
This commit is contained in:
Daniel Eklöf 2024-04-12 15:35:25 +02:00
parent 4fd26c251c
commit e753bb953b
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 1 additions and 4 deletions

View file

@ -1096,7 +1096,6 @@ handle_global(void *data, struct wl_registry *registry,
#if defined (WL_SURFACE_PREFERRED_BUFFER_SCALE_SINCE_VERSION)
const uint32_t preferred = WL_SURFACE_PREFERRED_BUFFER_SCALE_SINCE_VERSION;
wayl->has_wl_compositor_v6 = version >= WL_SURFACE_PREFERRED_BUFFER_SCALE_SINCE_VERSION;
#else
const uint32_t preferred = required;
#endif