1
0
Fork 0
forked from wry/wry

ipc: remove X-only code from traits

This commit is contained in:
Julian Orth 2024-10-08 12:58:32 +02:00
parent 1ca5d43557
commit 487efafdf5
6 changed files with 9 additions and 64 deletions

View file

@ -1749,7 +1749,13 @@ impl Wm {
for target in &targets {
add_data_source_mime_type::<T>(&source, target);
}
if let Err(e) = T::set_seat_selection(&seat, &source, None) {
let res = match source.location {
IpcLocation::Clipboard => seat.set_selection(Some(source.clone())),
IpcLocation::PrimarySelection => {
seat.set_primary_selection(Some(source.clone()))
}
};
if let Err(e) = res {
log::error!("Could not set selection: {}", ErrorFmt(e));
return Ok(());
}