1
0
Fork 0
forked from wry/wry

ipc: remove DynDataSource::offer_to_regular/wlr

This commit is contained in:
Julian Orth 2024-10-08 14:51:37 +02:00
parent 487efafdf5
commit 40f7bc2542
8 changed files with 31 additions and 110 deletions

View file

@ -4,12 +4,10 @@ use {
ifs::{
ipc::{
add_data_source_mime_type, break_source_loops, cancel_offers, destroy_data_source,
detach_seat, offer_source_to_regular_client, offer_source_to_wlr_device,
offer_source_to_x,
detach_seat, offer_source_to_x,
wl_data_device::ClipboardIpc,
wl_data_device_manager::{DND_ALL, DND_NONE},
x_data_device::{XClipboardIpc, XIpcDevice},
zwlr_data_control_device_v1::{WlrClipboardIpc, ZwlrDataControlDeviceV1},
DataSource, DynDataOffer, DynDataSource, SharedState, SourceData,
OFFER_STATE_ACCEPTED, OFFER_STATE_DROPPED, SOURCE_STATE_CANCELLED,
SOURCE_STATE_DROPPED,
@ -55,16 +53,8 @@ impl DynDataSource for WlDataSource {
WlDataSource::send_send(self, mime_type, fd);
}
fn offer_to_regular_client(self: Rc<Self>, client: &Rc<Client>) {
offer_source_to_regular_client::<ClipboardIpc, Self>(&self, client);
}
fn offer_to_x(self: Rc<Self>, dd: &Rc<XIpcDevice>) {
offer_source_to_x::<XClipboardIpc, Self>(&self, dd);
}
fn offer_to_wlr_device(self: Rc<Self>, dd: &Rc<ZwlrDataControlDeviceV1>) {
offer_source_to_wlr_device::<WlrClipboardIpc, Self>(&self, dd)
offer_source_to_x::<XClipboardIpc>(self, dd);
}
fn detach_seat(&self, seat: &Rc<WlSeatGlobal>) {