From 0b3d1d6faf2836f1262ec7a2f2bec99f6c73d26f Mon Sep 17 00:00:00 2001 From: Rostislav Pehlivanov Date: Tue, 15 May 2018 20:57:08 +0100 Subject: wayland_common: require wl_compositor of version 3 We already did require it, in order to call set_buffer_scale. This just makes it error out more gracefully. --- video/out/wayland_common.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'video/out/wayland_common.c') diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index e0adeea1b7..0ed14687bc 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -782,9 +782,8 @@ static void registry_handle_add(void *data, struct wl_registry *reg, uint32_t id int found = 1; struct vo_wayland_state *wl = data; - if (!strcmp(interface, wl_compositor_interface.name) && found++) { - ver = MPMIN(ver, 4); /* Cap the version */ - wl->compositor = wl_registry_bind(reg, id, &wl_compositor_interface, ver); + if (!strcmp(interface, wl_compositor_interface.name) && (ver >= 3) && found++) { + wl->compositor = wl_registry_bind(reg, id, &wl_compositor_interface, 3); wl->surface = wl_compositor_create_surface(wl->compositor); wl->cursor_surface = wl_compositor_create_surface(wl->compositor); wl_surface_add_listener(wl->surface, &surface_listener, wl); -- cgit v1.2.3