fix: popup cleanup
This commit is contained in:
parent
c781ff6199
commit
b5b2b2fcc3
2 changed files with 7 additions and 1 deletions
|
|
@ -1392,7 +1392,7 @@ impl SctkState {
|
|||
},
|
||||
};
|
||||
let mut to_destroy = vec![sctk_popup];
|
||||
// TODO optionally destroy parents if they request to be destroyed with children
|
||||
|
||||
while let Some(popup_to_destroy_last) = to_destroy.last().and_then(|popup| self
|
||||
.popups
|
||||
.iter()
|
||||
|
|
@ -1839,6 +1839,7 @@ impl SctkState {
|
|||
s: &WlSurface,
|
||||
) {
|
||||
let existing_blur = self.blur_surfaces.entry(id);
|
||||
|
||||
match (existing_blur, rectangles) {
|
||||
(Entry::Occupied(occupied_entry), None) => {
|
||||
let blur_surface = occupied_entry.remove();
|
||||
|
|
|
|||
|
|
@ -84,6 +84,11 @@ impl PopupHandler for SctkState {
|
|||
for popup in to_destroy.into_iter().rev() {
|
||||
if let Some(id) = self.id_map.remove(&popup.popup.wl_surface().id())
|
||||
{
|
||||
if let Some(blurred) = self.blur_surfaces.remove(&id) {
|
||||
blurred.destroy();
|
||||
}
|
||||
_ = self.corner_radii.remove(&id);
|
||||
|
||||
_ = self.destroyed.insert(id);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue