ipc: remove DynDataSource::offer_to_regular/wlr
This commit is contained in:
parent
487efafdf5
commit
40f7bc2542
8 changed files with 31 additions and 110 deletions
|
|
@ -3,7 +3,11 @@ use {
|
|||
client::{Client, ClientCaps, ClientError, CAP_DATA_CONTROL_MANAGER},
|
||||
globals::{Global, GlobalName},
|
||||
ifs::ipc::{
|
||||
zwlr_data_control_device_v1::{ZwlrDataControlDeviceV1, PRIMARY_SELECTION_SINCE},
|
||||
offer_source_to_wlr_device,
|
||||
zwlr_data_control_device_v1::{
|
||||
WlrClipboardIpc, WlrPrimarySelectionIpc, ZwlrDataControlDeviceV1,
|
||||
PRIMARY_SELECTION_SINCE,
|
||||
},
|
||||
zwlr_data_control_source_v1::ZwlrDataControlSourceV1,
|
||||
},
|
||||
leaks::Tracker,
|
||||
|
|
@ -78,12 +82,12 @@ impl ZwlrDataControlManagerV1RequestHandler for ZwlrDataControlManagerV1 {
|
|||
seat.global.add_wlr_device(&dev);
|
||||
self.client.add_client_obj(&dev)?;
|
||||
match seat.global.get_selection() {
|
||||
Some(s) => s.offer_to_wlr_device(&dev),
|
||||
Some(s) => offer_source_to_wlr_device::<WlrClipboardIpc>(s, &dev),
|
||||
_ => dev.send_selection(None),
|
||||
}
|
||||
if self.version >= PRIMARY_SELECTION_SINCE {
|
||||
match seat.global.get_primary_selection() {
|
||||
Some(s) => s.offer_to_wlr_device(&dev),
|
||||
Some(s) => offer_source_to_wlr_device::<WlrPrimarySelectionIpc>(s, &dev),
|
||||
_ => dev.send_primary_selection(None),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue