ui: drop spice-protocol < 0.14.3 support
According to repology, all our supported distributions have 0.14.3. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Link: https://lore.kernel.org/r/20260211-cleanups-v1-7-e63c96572389@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Marc-André Lureau committed
Feb 11, 2026 at 14:01 UTC
1df5a9be657c619edefe152ebc60ce70640feef8
2 files changed
+1
-19
meson.build
+1
-1
@@ -1325,7 +1325,7 @@ endif
1325
1326
spice_protocol = not_found
1327
if not get_option('spice_protocol').auto() or have_system
1328
- spice_protocol = dependency('spice-protocol', version: '>=0.14.0',
1328
+ spice_protocol = dependency('spice-protocol', version: '>=0.14.3',
1329
required: get_option('spice_protocol'),
1330
method: 'pkg-config')
1331
endif
ui/vdagent.c
-18
@@ -17,14 +17,6 @@
17
18
#include "spice/vd_agent.h"
19
20
-#define CHECK_SPICE_PROTOCOL_VERSION(major, minor, micro) \
21
- (CONFIG_SPICE_PROTOCOL_MAJOR > (major) || \
22
- (CONFIG_SPICE_PROTOCOL_MAJOR == (major) && \
23
- CONFIG_SPICE_PROTOCOL_MINOR > (minor)) || \
24
- (CONFIG_SPICE_PROTOCOL_MAJOR == (major) && \
25
- CONFIG_SPICE_PROTOCOL_MINOR == (minor) && \
26
- CONFIG_SPICE_PROTOCOL_MICRO >= (micro)))
27
-
20
#define VDAGENT_BUFFER_LIMIT (1 * MiB)
21
#define VDAGENT_MOUSE_DEFAULT true
22
#define VDAGENT_CLIPBOARD_DEFAULT false
@@ -87,10 +79,8 @@ static const char *cap_name[] = {
79
[VD_AGENT_CAP_FILE_XFER_DISABLED] = "file-xfer-disabled",
80
[VD_AGENT_CAP_FILE_XFER_DETAILED_ERRORS] = "file-xfer-detailed-errors",
81
[VD_AGENT_CAP_GRAPHICS_DEVICE_INFO] = "graphics-device-info",
90
-#if CHECK_SPICE_PROTOCOL_VERSION(0, 14, 1)
82
[VD_AGENT_CAP_CLIPBOARD_NO_RELEASE_ON_REGRAB] = "clipboard-no-release-on-regrab",
83
[VD_AGENT_CAP_CLIPBOARD_GRAB_SERIAL] = "clipboard-grab-serial",
93
-#endif
84
};
85
86
static const char *msg_name[] = {
@@ -125,9 +115,7 @@ static const char *type_name[] = {
115
[VD_AGENT_CLIPBOARD_IMAGE_BMP] = "bmp",
116
[VD_AGENT_CLIPBOARD_IMAGE_TIFF] = "tiff",
117
[VD_AGENT_CLIPBOARD_IMAGE_JPG] = "jpg",
128
-#if CHECK_SPICE_PROTOCOL_VERSION(0, 14, 3)
118
[VD_AGENT_CLIPBOARD_FILE_LIST] = "files",
130
-#endif
119
};
120
121
#define GET_NAME(_m, _v) \
@@ -197,9 +185,7 @@ static void vdagent_send_caps(VDAgentChardev *vd, bool request)
185
if (vd->clipboard) {
186
caps->caps[0] |= (1 << VD_AGENT_CAP_CLIPBOARD_BY_DEMAND);
187
caps->caps[0] |= (1 << VD_AGENT_CAP_CLIPBOARD_SELECTION);
200
-#if CHECK_SPICE_PROTOCOL_VERSION(0, 14, 1)
188
caps->caps[0] |= (1 << VD_AGENT_CAP_CLIPBOARD_GRAB_SERIAL);
202
-#endif
189
}
190
191
caps->request = request;
@@ -318,11 +304,7 @@ static bool have_selection(VDAgentChardev *vd)
304
305
static bool have_clipboard_serial(VDAgentChardev *vd)
306
{
321
-#if CHECK_SPICE_PROTOCOL_VERSION(0, 14, 1)
307
return vd->caps & (1 << VD_AGENT_CAP_CLIPBOARD_GRAB_SERIAL);
323
-#else
324
- return false;
325
-#endif
308
}
309
310
static uint32_t type_qemu_to_vdagent(enum QemuClipboardType type)