mirror of
https://github.com/brl/mutter.git
synced 2024-11-09 15:37:00 -05:00
wayland/xdg-output: Add xdg-output v3 support
xdg-output v3 marks `xdg_output.done` as deprecated, avoid sending that event for clients using xdg-output v3. https://gitlab.gnome.org/GNOME/mutter/merge_requests/704
This commit is contained in:
parent
220e4caf36
commit
13deb22223
@ -42,7 +42,7 @@ gudev_req = '>= 232'
|
||||
|
||||
# wayland version requirements
|
||||
wayland_server_req = '>= 1.13.0'
|
||||
wayland_protocols_req = '>= 1.16'
|
||||
wayland_protocols_req = '>= 1.18'
|
||||
|
||||
# native backend version requirements
|
||||
libinput_req = '>= 1.4'
|
||||
|
@ -35,6 +35,8 @@
|
||||
|
||||
#include "xdg-output-unstable-v1-server-protocol.h"
|
||||
|
||||
/* Wayland protocol headers list new additions, not deprecations */
|
||||
#define NO_XDG_OUTPUT_DONE_SINCE_VERSION 3
|
||||
|
||||
enum
|
||||
{
|
||||
@ -382,7 +384,8 @@ wayland_output_update_for_output (MetaWaylandOutput *wayland_output,
|
||||
for (iter = wayland_output->xdg_output_resources; iter; iter = iter->next)
|
||||
{
|
||||
struct wl_resource *xdg_output = iter->data;
|
||||
zxdg_output_v1_send_done (xdg_output);
|
||||
if (wl_resource_get_version (xdg_output) < NO_XDG_OUTPUT_DONE_SINCE_VERSION)
|
||||
zxdg_output_v1_send_done (xdg_output);
|
||||
}
|
||||
}
|
||||
/* It's very important that we change the output pointer here, as
|
||||
@ -621,7 +624,7 @@ send_xdg_output_events (struct wl_resource *resource,
|
||||
zxdg_output_v1_send_description (resource, description);
|
||||
}
|
||||
|
||||
if (need_all_events)
|
||||
if (need_all_events && version < NO_XDG_OUTPUT_DONE_SINCE_VERSION)
|
||||
{
|
||||
zxdg_output_v1_send_done (resource);
|
||||
need_done = FALSE;
|
||||
|
@ -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 2
|
||||
#define META_ZXDG_OUTPUT_V1_VERSION 3
|
||||
#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