From 069392653db6f227d1ad518df287a30216d804a5 Mon Sep 17 00:00:00 2001 From: Sunderland93 Date: Sun, 12 Jul 2026 14:16:49 +0400 Subject: [PATCH] [Wayland] Switch to stable linux-dmabuf --- src/meson.build | 9 +++++++-- src/wayland/meta-wayland-dma-buf.c | 4 ++-- src/wayland/meta-wayland-versions.h | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/meson.build b/src/meson.build index 97702abfb..0a6147ba3 100644 --- a/src/meson.build +++ b/src/meson.build @@ -825,7 +825,7 @@ if have_wayland ['wlr-layer-shell-unstable-v1', 'private', ], ['idle-inhibit', 'unstable', 'v1', ], ['keyboard-shortcuts-inhibit', 'unstable', 'v1', ], - ['linux-dmabuf', 'unstable', 'v1', ], + ['linux-dmabuf', 'stable', 'v1', ], ['pointer-constraints', 'unstable', 'v1', ], ['pointer-gestures', 'unstable', 'v1', ], ['pointer-warp-v1', 'private',], @@ -864,7 +864,12 @@ if have_wayland protocol_type = p.get(1) if protocol_type == 'stable' - output_base = protocol_name + if p.length() == 3 + protocol_version = p.get(2) + output_base = '@0@-@1@'.format(protocol_name, protocol_version) + else + output_base = protocol_name + endif input = join_paths(protocols_dir, '@0@/@1@/@2@.xml'.format(protocol_type, protocol_name, diff --git a/src/wayland/meta-wayland-dma-buf.c b/src/wayland/meta-wayland-dma-buf.c index 645eaf785..9481fab10 100644 --- a/src/wayland/meta-wayland-dma-buf.c +++ b/src/wayland/meta-wayland-dma-buf.c @@ -61,7 +61,7 @@ #include "backends/native/meta-renderer-native.h" #endif -#include "linux-dmabuf-unstable-v1-server-protocol.h" +#include "linux-dmabuf-v1-server-protocol.h" #ifndef DRM_FORMAT_MOD_INVALID #define DRM_FORMAT_MOD_INVALID ((1ULL << 56) - 1) @@ -418,7 +418,7 @@ buffer_params_add (struct wl_client *client, dma_buf->drm_modifier != drm_modifier) { wl_resource_post_error (resource, - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_WL_BUFFER, + ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_FORMAT, "mismatching modifier between planes"); return; } diff --git a/src/wayland/meta-wayland-versions.h b/src/wayland/meta-wayland-versions.h index 44275d9f9..00b92239c 100644 --- a/src/wayland/meta-wayland-versions.h +++ b/src/wayland/meta-wayland-versions.h @@ -49,7 +49,7 @@ #define META_ZXDG_IMPORTER_V1_VERSION 1 #define META_ZXDG_EXPORTER_V2_VERSION 1 #define META_ZXDG_IMPORTER_V2_VERSION 1 -#define META_ZWP_LINUX_DMABUF_V1_VERSION 4 +#define META_ZWP_LINUX_DMABUF_V1_VERSION 5 #define META_ZWP_KEYBOARD_SHORTCUTS_INHIBIT_V1_VERSION 1 #define META_ZXDG_OUTPUT_V1_VERSION 3 #define META_ZWP_XWAYLAND_KEYBOARD_GRAB_V1_VERSION 1