From 4b051aa926aa37b99f586b47caab1dcdfddfee65 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sat, 27 Apr 2019 17:38:20 +0300 Subject: [PATCH] meson: fix wayland-server minimum required version Having 1.16 results in the following error when running the compositor: 2019-04-27 17:30:50 - [wayland] wl_global_create: implemented version for 'wl_seat' higher than interface version (7 > 6) 2019-04-27 17:30:50 - [sway/input/seat.c:428] seat_create:could not allocate seat We require wayland-server >= 1.17 for wl_seat version 7. Fixes: a671fc51d25c ("Advertise wl_seat version 7") Fixes: a656e486f4a6 ("seat: fallback to v6 if libwayland 1.17 isn't available") --- meson.build | 2 +- types/seat/wlr_seat.c | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index dd4f1e4d..9c7e09b0 100644 --- a/meson.build +++ b/meson.build @@ -95,7 +95,7 @@ if cc.get_id() == 'clang' add_project_arguments('-Wno-missing-braces', language: 'c') endif -wayland_server = dependency('wayland-server', version: '>=1.16') +wayland_server = dependency('wayland-server', version: '>=1.17') wayland_client = dependency('wayland-client') wayland_egl = dependency('wayland-egl') wayland_protos = dependency('wayland-protocols', version: '>=1.17') diff --git a/types/seat/wlr_seat.c b/types/seat/wlr_seat.c index 0a5e2d4c..1a7b00bb 100644 --- a/types/seat/wlr_seat.c +++ b/types/seat/wlr_seat.c @@ -254,13 +254,8 @@ struct wlr_seat *wlr_seat_create(struct wl_display *display, const char *name) { seat->touch_state.seat = seat; wl_list_init(&seat->touch_state.touch_points); - // TODO: always use SEAT_VERSION (requires libwayland 1.17) - uint32_t version = SEAT_VERSION; - if (wl_seat_interface.version < SEAT_VERSION) { - version = wl_seat_interface.version; - } seat->global = wl_global_create(display, &wl_seat_interface, - version, seat, seat_handle_bind); + SEAT_VERSION, seat, seat_handle_bind); if (seat->global == NULL) { free(touch_grab); free(pointer_grab);