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:
parent
d2d7c655ac
commit
e814eebcc0
4 changed files with 32 additions and 6 deletions
13
src/wayland/handlers/data_control/ext.rs
Normal file
13
src/wayland/handlers/data_control/ext.rs
Normal 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);
|
||||
4
src/wayland/handlers/data_control/mod.rs
Normal file
4
src/wayland/handlers/data_control/mod.rs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
mod ext;
|
||||
mod wlr;
|
||||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue