OSDN Git Service

wayland: Also support wl_drm version 1
authorPhilipp Kerling <pkerling@casix.org>
Tue, 20 Jun 2017 17:32:34 +0000 (19:32 +0200)
committerXiang, Haihao <haihao.xiang@intel.com>
Wed, 21 Jun 2017 04:51:13 +0000 (12:51 +0800)
Just using version 2 without checking would lead to a protocol error
bringing down the entire application, and wl_drm version 1 is still
supported since v2 only adds PRIME capabilities.

src/i965_output_wayland.c

index 8251271..e263fbb 100644 (file)
@@ -155,7 +155,8 @@ registry_handle_global(
 
     if (strcmp(interface, "wl_drm") == 0) {
         wl_output->wl_drm = registry_bind(wl_vtable, wl_output->wl_registry,
-                                          id, wl_vtable->drm_interface, 2);
+                                          id, wl_vtable->drm_interface,
+                                          (version < 2) ? version : 2);
     }
 }