Add ext-data-control-v1 protocol

This is identical to the wlr protocol, and Smithay has implementations
for both.

New clients should use the `ext` protocol where present. Not sure how
widely used it is yet, but we probably should have both for now.
This commit is contained in:
Ian Douglas Scott 2025-10-28 14:13:05 -07:00 committed by Victoria Brekenfeld
parent d2d7c655ac
commit e814eebcc0
4 changed files with 32 additions and 6 deletions

View file

@ -0,0 +1,13 @@
use crate::state::State;
use smithay::{
delegate_ext_data_control,
wayland::selection::ext_data_control::{DataControlHandler, DataControlState},
};
impl DataControlHandler for State {
fn data_control_state(&mut self) -> &mut DataControlState {
&mut self.common.ext_data_control_state
}
}
delegate_ext_data_control!(State);

View file

@ -0,0 +1,4 @@
// SPDX-License-Identifier: GPL-3.0-only
mod ext;
mod wlr;

View file

@ -8,7 +8,7 @@ use smithay::{
impl DataControlHandler for State {
fn data_control_state(&mut self) -> &mut DataControlState {
&mut self.common.data_control_state
&mut self.common.wlr_data_control_state
}
}