add support for the data control protocol

Enables the protocol documented at
https://wayland.app/protocols/ext-data-control-v1

It is the upstreamed version of the old wlr_data_control.

It is used e.g. by mpv to read and write the clipboard.
This commit is contained in:
Guido Cella 2026-02-03 11:44:47 +01:00
parent 9b11a49cb7
commit 7890bfc024

2
dwl.c
View File

@ -24,6 +24,7 @@
#include <wlr/types/wlr_data_device.h> #include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_drm.h> #include <wlr/types/wlr_drm.h>
#include <wlr/types/wlr_export_dmabuf_v1.h> #include <wlr/types/wlr_export_dmabuf_v1.h>
#include <wlr/types/wlr_ext_data_control_v1.h>
#include <wlr/types/wlr_fractional_scale_v1.h> #include <wlr/types/wlr_fractional_scale_v1.h>
#include <wlr/types/wlr_gamma_control_v1.h> #include <wlr/types/wlr_gamma_control_v1.h>
#include <wlr/types/wlr_idle_inhibit_v1.h> #include <wlr/types/wlr_idle_inhibit_v1.h>
@ -2518,6 +2519,7 @@ setup(void)
wlr_export_dmabuf_manager_v1_create(dpy); wlr_export_dmabuf_manager_v1_create(dpy);
wlr_screencopy_manager_v1_create(dpy); wlr_screencopy_manager_v1_create(dpy);
wlr_data_control_manager_v1_create(dpy); wlr_data_control_manager_v1_create(dpy);
wlr_ext_data_control_manager_v1_create(dpy, 1);
wlr_primary_selection_v1_device_manager_create(dpy); wlr_primary_selection_v1_device_manager_create(dpy);
wlr_viewporter_create(dpy); wlr_viewporter_create(dpy);
wlr_single_pixel_buffer_manager_v1_create(dpy); wlr_single_pixel_buffer_manager_v1_create(dpy);