From 7e838b1115f195ba4c7b06169ade3407d29c66d0 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Thu, 10 Nov 2022 13:19:16 +0100 Subject: [PATCH] wayland/outputs: Implement wl_output v4 This version adds the name and description events already present in xdg_output. Part-of: --- src/wayland/meta-wayland-outputs.c | 18 ++++++++++++++++++ src/wayland/meta-wayland-versions.h | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-outputs.c b/src/wayland/meta-wayland-outputs.c index 84fb3190d..c2ed5986b 100644 --- a/src/wayland/meta-wayland-outputs.c +++ b/src/wayland/meta-wayland-outputs.c @@ -290,6 +290,24 @@ send_output_events (struct wl_resource *resource, } } + if (need_all_events && version >= WL_OUTPUT_NAME_SINCE_VERSION) + { + const char *name; + + name = meta_monitor_get_connector (monitor); + wl_output_send_name (resource, name); + need_done = TRUE; + } + + if (need_all_events && version >= WL_OUTPUT_DESCRIPTION_SINCE_VERSION) + { + const char *description; + + description = meta_monitor_get_display_name (monitor); + wl_output_send_description (resource, description); + need_done = TRUE; + } + if (need_all_events && version >= WL_OUTPUT_DONE_SINCE_VERSION) { wl_output_send_done (resource); diff --git a/src/wayland/meta-wayland-versions.h b/src/wayland/meta-wayland-versions.h index 878ba0ee5..254916f90 100644 --- a/src/wayland/meta-wayland-versions.h +++ b/src/wayland/meta-wayland-versions.h @@ -39,7 +39,7 @@ #define META_WL_DATA_DEVICE_MANAGER_VERSION 3 #define META_XDG_WM_BASE_VERSION 4 #define META_WL_SEAT_VERSION 8 -#define META_WL_OUTPUT_VERSION 3 +#define META_WL_OUTPUT_VERSION 4 #define META_XSERVER_VERSION 1 #define META_GTK_SHELL1_VERSION 5 #define META_WL_SUBCOMPOSITOR_VERSION 1