1
0
Fork 0
forked from wry/wry

wl_surface: move dnd logic to separate module

This commit is contained in:
Julian Orth 2024-07-10 19:43:54 +02:00
parent f871ea1d67
commit af15e20e9b
6 changed files with 93 additions and 45 deletions

View file

@ -9,7 +9,7 @@ use {
IterableIpcVtable, OfferData, Role,
},
wl_seat::{WlSeatError, WlSeatGlobal},
wl_surface::{SurfaceRole, WlSurfaceError},
wl_surface::WlSurfaceError,
},
leaks::Tracker,
object::{Object, Version},
@ -115,8 +115,7 @@ impl WlDataDeviceRequestHandler for WlDataDevice {
};
let icon = if req.icon.is_some() {
let icon = self.client.lookup(req.icon)?;
icon.set_role(SurfaceRole::DndIcon)?;
Some(icon)
Some(icon.into_dnd_icon(&self.seat)?)
} else {
None
};