From 8b1015a5c7da1f711e3fe35e2ba2f023cc10eeac Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 11 Dec 2023 13:55:20 +0100 Subject: [PATCH] wayland: Switch to stable linux-dmabuf protocol It is the first protocol to keep the `-vN-` despite being declared stable. Part-of: --- src/meson.build | 9 +++++++-- .../wayland-test-clients/wayland-test-client-utils.h | 2 +- src/wayland/meta-wayland-dma-buf.c | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/meson.build b/src/meson.build index 21006707a..06255bf84 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1060,7 +1060,7 @@ if have_wayland ['gtk-shell', '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', ], ['presentation-time', 'stable', ], @@ -1098,7 +1098,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 = protocols_dir / protocol_type / protocol_name / '@0@.xml'.format(output_base) elif protocol_type == 'staging' protocol_version = p.get(2) diff --git a/src/tests/wayland-test-clients/wayland-test-client-utils.h b/src/tests/wayland-test-clients/wayland-test-client-utils.h index 9bec78bac..f22982b75 100644 --- a/src/tests/wayland-test-clients/wayland-test-client-utils.h +++ b/src/tests/wayland-test-clients/wayland-test-client-utils.h @@ -7,7 +7,7 @@ #include #include "fractional-scale-v1-client-protocol.h" -#include "linux-dmabuf-unstable-v1-client-protocol.h" +#include "linux-dmabuf-v1-client-protocol.h" #include "single-pixel-buffer-v1-client-protocol.h" #include "test-driver-client-protocol.h" #include "viewporter-client-protocol.h" diff --git a/src/wayland/meta-wayland-dma-buf.c b/src/wayland/meta-wayland-dma-buf.c index 333a12f66..2359511c9 100644 --- a/src/wayland/meta-wayland-dma-buf.c +++ b/src/wayland/meta-wayland-dma-buf.c @@ -65,7 +65,7 @@ #include "backends/native/meta-renderer-native.h" #endif -#include "linux-dmabuf-unstable-v1-server-protocol.h" +#include "linux-dmabuf-v1-server-protocol.h" #define META_WAYLAND_DMA_BUF_MAX_FDS 4