From 82fffacbae0bd117194e727975d75c09432efa83 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Sun, 27 Sep 2020 17:14:35 +0200 Subject: [PATCH] wayland: Add versions to primary selection protocols Just so we follow convention - those versions are unlikely to ever change. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1452 --- src/wayland/meta-wayland-data-device-primary-legacy.c | 3 ++- src/wayland/meta-wayland-data-device-primary.c | 3 ++- src/wayland/meta-wayland-versions.h | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/wayland/meta-wayland-data-device-primary-legacy.c b/src/wayland/meta-wayland-data-device-primary-legacy.c index 2c5304c5f..26d432357 100644 --- a/src/wayland/meta-wayland-data-device-primary-legacy.c +++ b/src/wayland/meta-wayland-data-device-primary-legacy.c @@ -284,7 +284,8 @@ meta_wayland_data_device_primary_legacy_manager_init (MetaWaylandCompositor *com { if (wl_global_create (compositor->wayland_display, >k_primary_selection_device_manager_interface, - 1, NULL, bind_primary_manager) == NULL) + META_GTK_PRIMARY_SELECTION_VERSION, + NULL, bind_primary_manager) == NULL) g_error ("Could not create data_device"); } diff --git a/src/wayland/meta-wayland-data-device-primary.c b/src/wayland/meta-wayland-data-device-primary.c index fb6417cfe..ef1c5d964 100644 --- a/src/wayland/meta-wayland-data-device-primary.c +++ b/src/wayland/meta-wayland-data-device-primary.c @@ -283,7 +283,8 @@ meta_wayland_data_device_primary_manager_init (MetaWaylandCompositor *compositor { if (wl_global_create (compositor->wayland_display, &zwp_primary_selection_device_manager_v1_interface, - 1, NULL, bind_primary_manager) == NULL) + META_ZWP_PRIMARY_SELECTION_V1_VERSION, + NULL, bind_primary_manager) == NULL) g_error ("Could not create data_device"); } diff --git a/src/wayland/meta-wayland-versions.h b/src/wayland/meta-wayland-versions.h index 2d6ce5ace..7a750413f 100644 --- a/src/wayland/meta-wayland-versions.h +++ b/src/wayland/meta-wayland-versions.h @@ -55,5 +55,7 @@ #define META_GTK_TEXT_INPUT_VERSION 1 #define META_ZWP_TEXT_INPUT_V3_VERSION 1 #define META_WP_VIEWPORTER_VERSION 1 +#define META_GTK_PRIMARY_SELECTION_VERSION 1 +#define META_ZWP_PRIMARY_SELECTION_V1_VERSION 1 #endif