Skip to content

Commit f2647b9

Browse files
committed
fix: remove a destroyed surface from compositor surfaces
1 parent c764938 commit f2647b9

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

sctk/src/application.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ where
380380
// let mut current_context_window = init_id_inner;
381381

382382
let mut kbd_surface_id: Option<ObjectId> = None;
383-
let mut mods = Modifiers::default();
383+
let mut mods: Modifiers = Modifiers::default();
384384
let mut destroyed_surface_ids: HashMap<ObjectId, SurfaceIdWrapper> =
385385
Default::default();
386386
let mut simple_clipboard = Clipboard::unconnected();
@@ -458,6 +458,7 @@ where
458458
states.remove(&surface_id.inner());
459459
messages.push(application.close_requested(surface_id.inner()));
460460
destroyed_surface_ids.insert(id.id(), surface_id);
461+
compositor_surfaces.remove(&surface_id.inner());
461462
// if exit_on_close_request && surface_id == init_id {
462463
// break 'main;
463464
// }
@@ -521,6 +522,7 @@ where
521522
states.remove(&surface_id.inner());
522523
messages.push(application.close_requested(surface_id.inner()));
523524
destroyed_surface_ids.insert(id.id(), surface_id);
525+
compositor_surfaces.remove(&surface_id.inner());
524526
// if exit_on_close_request && surface_id == init_id {
525527
// break 'main;
526528
// }
@@ -587,6 +589,7 @@ where
587589
states.remove(&surface_id.inner());
588590
messages.push(application.close_requested(surface_id.inner()));
589591
destroyed_surface_ids.insert(id.id(), surface_id);
592+
compositor_surfaces.remove(&surface_id.inner());
590593
}
591594
}
592595
PopupEventVariant::WmCapabilities(_) => {}
@@ -669,6 +672,7 @@ where
669672
interfaces.remove(inner);
670673
states.remove(inner);
671674
destroyed_surface_ids.insert(id.clone(), *surface_id);
675+
compositor_surfaces.remove(&surface_id.inner());
672676
false
673677
},
674678
_ => true,

0 commit comments

Comments
 (0)