diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2018-05-15 20:57:08 +0100 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2018-05-20 02:48:23 +0300 |
commit | 0b3d1d6faf2836f1262ec7a2f2bec99f6c73d26f (patch) | |
tree | ba0bfba65a4de38bce92ad9f04e1034ca8e99041 /video | |
parent | 43d575616cc942943f3f41c2673de158127daef6 (diff) | |
download | mpv-0b3d1d6faf2836f1262ec7a2f2bec99f6c73d26f.tar.bz2 mpv-0b3d1d6faf2836f1262ec7a2f2bec99f6c73d26f.tar.xz |
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.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/wayland_common.c | 5 |
1 files changed, 2 insertions, 3 deletions
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); |