iced: propagate pane drag destinations
This commit is contained in:
parent
1fb7e08f23
commit
a489a6b790
9 changed files with 142 additions and 15 deletions
|
|
@ -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 => {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue