wayland/xdg-output: Add xdg-output v2 support
xdg-output v2 adds the output name and description events, add siupports for these in mutter. https://gitlab.gnome.org/GNOME/mutter/issues/645
This commit is contained in:
parent
bca08c2c4e
commit
b138006bb7
@ -573,7 +573,9 @@ send_xdg_output_events (struct wl_resource *resource,
|
||||
MetaRectangle new_layout;
|
||||
MetaRectangle old_layout;
|
||||
MetaLogicalMonitor *old_logical_monitor;
|
||||
MetaMonitor *monitor;
|
||||
gboolean need_done;
|
||||
int version;
|
||||
|
||||
need_done = FALSE;
|
||||
old_logical_monitor = wayland_output->logical_monitor;
|
||||
@ -600,6 +602,25 @@ send_xdg_output_events (struct wl_resource *resource,
|
||||
need_done = TRUE;
|
||||
}
|
||||
|
||||
version = wl_resource_get_version (resource);
|
||||
monitor = pick_main_monitor (logical_monitor);
|
||||
|
||||
if (need_all_events && version >= ZXDG_OUTPUT_V1_NAME_SINCE_VERSION)
|
||||
{
|
||||
const char *name;
|
||||
|
||||
name = meta_monitor_get_connector (monitor);
|
||||
zxdg_output_v1_send_name (resource, name);
|
||||
}
|
||||
|
||||
if (need_all_events && version >= ZXDG_OUTPUT_V1_DESCRIPTION_SINCE_VERSION)
|
||||
{
|
||||
const char *description;
|
||||
|
||||
description = meta_monitor_get_display_name (monitor);
|
||||
zxdg_output_v1_send_description (resource, description);
|
||||
}
|
||||
|
||||
if (need_all_events)
|
||||
{
|
||||
zxdg_output_v1_send_done (resource);
|
||||
|
@ -50,7 +50,7 @@
|
||||
#define META_ZXDG_IMPORTER_V1_VERSION 1
|
||||
#define META_ZWP_LINUX_DMABUF_V1_VERSION 3
|
||||
#define META_ZWP_KEYBOARD_SHORTCUTS_INHIBIT_V1_VERSION 1
|
||||
#define META_ZXDG_OUTPUT_V1_VERSION 1
|
||||
#define META_ZXDG_OUTPUT_V1_VERSION 2
|
||||
#define META_ZWP_XWAYLAND_KEYBOARD_GRAB_V1_VERSION 1
|
||||
#define META_GTK_TEXT_INPUT_VERSION 1
|
||||
#define META_ZWP_TEXT_INPUT_V3_VERSION 1
|
||||
|
Loading…
Reference in New Issue
Block a user