iced: propagate pane drag destinations

This commit is contained in:
Stephan Buys 2025-11-19 15:44:21 +02:00 • committed by Ashley Wulber
parent 1fb7e08f23
commit a489a6b790
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
9 changed files with 142 additions and 15 deletions

View file

@ -402,7 +402,13 @@ impl crate::core::Clipboard for Clipboard {
sender,
..
} => {
log::debug!(
"clipboard::start_dnd queued internal={} source={:?}",
internal,
source_surface
);
_ = sender.sender.unbounded_send(Control::StartDnd);
queued_events.push(StartDnd {
internal,
source_surface,
@ -422,6 +428,25 @@ impl crate::core::Clipboard for Clipboard {
) {
match &self.state {
State::Connected { clipboard, .. } => {
trace!(
target: "iced::winit::clipboard",
"register destination surface={:?} count={}",
surface,
rectangles.len()
);
for rect in &rectangles {
trace!(
target: "iced::winit::clipboard",
"rect id={:?} bounds=({:.2},{:.2},{:.2},{:.2}) actions={:?} preferred={:?}",
rect.id,
rect.rectangle.x,
rect.rectangle.y,
rect.rectangle.width,
rect.rectangle.height,
rect.actions,
rect.preferred
);
}
_ = clipboard.register_dnd_destination(surface, rectangles)
}
State::Unavailable => {}