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: a671fc51d2 ("Advertise wl_seat version 7")
Fixes: a656e486f4 ("seat: fallback to v6 if libwayland 1.17 isn't available")
This commit is contained in:
Simon Ser 2019-04-27 17:38:20 +03:00 committed by Scott Anderson
parent f2943bdf61
commit 4b051aa926
2 changed files with 2 additions and 7 deletions

View file

@ -95,7 +95,7 @@ if cc.get_id() == 'clang'
add_project_arguments('-Wno-missing-braces', language: 'c') add_project_arguments('-Wno-missing-braces', language: 'c')
endif endif
wayland_server = dependency('wayland-server', version: '>=1.16') wayland_server = dependency('wayland-server', version: '>=1.17')
wayland_client = dependency('wayland-client') wayland_client = dependency('wayland-client')
wayland_egl = dependency('wayland-egl') wayland_egl = dependency('wayland-egl')
wayland_protos = dependency('wayland-protocols', version: '>=1.17') wayland_protos = dependency('wayland-protocols', version: '>=1.17')

View file

@ -254,13 +254,8 @@ struct wlr_seat *wlr_seat_create(struct wl_display *display, const char *name) {
seat->touch_state.seat = seat; seat->touch_state.seat = seat;
wl_list_init(&seat->touch_state.touch_points); 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, seat->global = wl_global_create(display, &wl_seat_interface,
version, seat, seat_handle_bind); SEAT_VERSION, seat, seat_handle_bind);
if (seat->global == NULL) { if (seat->global == NULL) {
free(touch_grab); free(touch_grab);
free(pointer_grab); free(pointer_grab);