wayland/outputs: Implement wl_output v4

This version adds the name and description events already present
in xdg_output.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2692>
This commit is contained in:
Robert Mader 2022-11-10 13:19:16 +01:00
parent 1b1eed0dbd
commit 7e838b1115
2 changed files with 19 additions and 1 deletions

View File

@ -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) if (need_all_events && version >= WL_OUTPUT_DONE_SINCE_VERSION)
{ {
wl_output_send_done (resource); wl_output_send_done (resource);

View File

@ -39,7 +39,7 @@
#define META_WL_DATA_DEVICE_MANAGER_VERSION 3 #define META_WL_DATA_DEVICE_MANAGER_VERSION 3
#define META_XDG_WM_BASE_VERSION 4 #define META_XDG_WM_BASE_VERSION 4
#define META_WL_SEAT_VERSION 8 #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_XSERVER_VERSION 1
#define META_GTK_SHELL1_VERSION 5 #define META_GTK_SHELL1_VERSION 5
#define META_WL_SUBCOMPOSITOR_VERSION 1 #define META_WL_SUBCOMPOSITOR_VERSION 1