fix(winit): cleanup layer surface dnd surface
This commit is contained in:
parent
8e08ceb25c
commit
dbbaa4f442
1 changed files with 4 additions and 6 deletions
|
|
@ -669,16 +669,14 @@ impl SctkEvent {
|
||||||
LayerSurfaceEventVariant::Done => {
|
LayerSurfaceEventVariant::Done => {
|
||||||
if let Some(id) = surface_ids.remove(&surface.id()) {
|
if let Some(id) = surface_ids.remove(&surface.id()) {
|
||||||
if let Some(w) = window_manager.remove(id.inner()) {
|
if let Some(w) = window_manager.remove(id.inner()) {
|
||||||
|
clipboard.register_dnd_destination(
|
||||||
|
DndSurface(Arc::new(Box::new(w.raw.clone()))),
|
||||||
|
Vec::new(),
|
||||||
|
);
|
||||||
if clipboard
|
if clipboard
|
||||||
.window_id()
|
.window_id()
|
||||||
.is_some_and(|id| w.raw.id() == id)
|
.is_some_and(|id| w.raw.id() == id)
|
||||||
{
|
{
|
||||||
clipboard.register_dnd_destination(
|
|
||||||
DndSurface(Arc::new(Box::new(
|
|
||||||
w.raw.clone(),
|
|
||||||
))),
|
|
||||||
Vec::new(),
|
|
||||||
);
|
|
||||||
*clipboard = Clipboard::unconnected();
|
*clipboard = Clipboard::unconnected();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue