diff --git a/meson.build b/meson.build index fb10be5078..87027ca187 100644 --- a/meson.build +++ b/meson.build @@ -1033,8 +1033,8 @@ if features['d3d11'] endif wayland = { - 'deps': [dependency('wayland-client', version: '>= 1.21.0', required: get_option('wayland')), - dependency('wayland-cursor', version: '>= 1.21.0', required: get_option('wayland')), + 'deps': [dependency('wayland-client', version: '>= 1.22.0', required: get_option('wayland')), + dependency('wayland-cursor', version: '>= 1.22.0', required: get_option('wayland')), dependency('wayland-protocols', version: '>= 1.31', required: get_option('wayland')), dependency('xkbcommon', version: '>= 0.3.0', required: get_option('wayland'))], 'header': cc.has_header('linux/input-event-codes.h', required: get_option('wayland'), diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index b5b889b9d1..f53b832222 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -66,10 +66,6 @@ #include "color-representation-v1.h" #endif -#if WAYLAND_VERSION_MAJOR > 1 || WAYLAND_VERSION_MINOR >= 22 -#define HAVE_WAYLAND_1_22 -#endif - #ifndef CLOCK_MONOTONIC_RAW #define CLOCK_MONOTONIC_RAW 4 #endif @@ -1741,7 +1737,6 @@ static void surface_handle_leave(void *data, struct wl_surface *wl_surface, wl->pending_vo_events |= VO_EVENT_WIN_STATE; } -#ifdef HAVE_WAYLAND_1_22 static void surface_handle_preferred_buffer_scale(void *data, struct wl_surface *wl_surface, int32_t scale) @@ -1775,15 +1770,12 @@ static void surface_handle_preferred_buffer_transform(void *data, uint32_t transform) { } -#endif static const struct wl_surface_listener surface_listener = { surface_handle_enter, surface_handle_leave, -#ifdef HAVE_WAYLAND_1_22 surface_handle_preferred_buffer_scale, surface_handle_preferred_buffer_transform, -#endif }; static void xdg_wm_base_ping(void *data, struct xdg_wm_base *wm_base, uint32_t serial) @@ -2659,11 +2651,7 @@ static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id struct vo_wayland_state *wl = data; if (!strcmp(interface, wl_compositor_interface.name) && (ver >= 4) && found++) { -#ifdef HAVE_WAYLAND_1_22 ver = MPMIN(ver, 6); /* Cap at 6 in case new events are added later. */ -#else - ver = 4; -#endif wl->compositor = wl_registry_bind(reg, id, &wl_compositor_interface, ver); wl->surface = wl_compositor_create_surface(wl->compositor); wl->video_surface = wl_compositor_create_surface(wl->compositor);