From 084090643076649814555a381c5e00b35a89dad5 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 12 Feb 2024 21:13:35 +0100 Subject: [PATCH] Add ext-screencopy-v1 and ext-image-source-v1 References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4545 --- include/sway/server.h | 1 + protocols/meson.build | 3 +++ sway/server.c | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/include/sway/server.h b/include/sway/server.h index c71851f6..691d5de4 100644 --- a/include/sway/server.h +++ b/include/sway/server.h @@ -105,6 +105,7 @@ struct sway_server { struct wlr_content_type_manager_v1 *content_type_manager_v1; struct wlr_data_control_manager_v1 *data_control_manager_v1; struct wlr_screencopy_manager_v1 *screencopy_manager_v1; + struct wlr_ext_screencopy_manager_v1 *ext_screencopy_manager_v1; struct wlr_export_dmabuf_manager_v1 *export_dmabuf_manager_v1; struct wlr_security_context_manager_v1 *security_context_manager_v1; diff --git a/protocols/meson.build b/protocols/meson.build index 81edb584..5031bb8a 100644 --- a/protocols/meson.build +++ b/protocols/meson.build @@ -14,6 +14,9 @@ protocols = [ wl_protocol_dir / 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml', wl_protocol_dir / 'staging/content-type/content-type-v1.xml', wl_protocol_dir / 'staging/cursor-shape/cursor-shape-v1.xml', + wl_protocol_dir / 'staging/ext-foreign-toplevel-list/ext-foreign-toplevel-list-v1.xml', + wl_protocol_dir / 'staging/ext-image-source/ext-image-source-v1.xml', + wl_protocol_dir / 'staging/ext-screencopy/ext-screencopy-v1.xml', 'wlr-layer-shell-unstable-v1.xml', 'idle.xml', 'wlr-output-power-management-unstable-v1.xml', diff --git a/sway/server.c b/sway/server.c index d159dc9b..14f1fb6a 100644 --- a/sway/server.c +++ b/sway/server.c @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include #include #include @@ -105,6 +107,7 @@ static bool is_privileged(const struct wl_global *global) { global == server.foreign_toplevel_manager->global || global == server.data_control_manager_v1->global || global == server.screencopy_manager_v1->global || + global == server.ext_screencopy_manager_v1->global || global == server.export_dmabuf_manager_v1->global || global == server.security_context_manager_v1->global || global == server.gamma_control_manager_v1->global || @@ -363,6 +366,8 @@ bool server_init(struct sway_server *server) { server->export_dmabuf_manager_v1 = wlr_export_dmabuf_manager_v1_create(server->wl_display); server->screencopy_manager_v1 = wlr_screencopy_manager_v1_create(server->wl_display); + server->ext_screencopy_manager_v1 = wlr_ext_screencopy_manager_v1_create(server->wl_display, 1); + wlr_ext_output_image_source_manager_v1_create(server->wl_display, 1); server->data_control_manager_v1 = wlr_data_control_manager_v1_create(server->wl_display); server->security_context_manager_v1 = wlr_security_context_manager_v1_create(server->wl_display); wlr_viewporter_create(server->wl_display);