shell/stack: Cleanup previous_index on remove
This commit is contained in:
parent
d4c5714c10
commit
836ccbaa0b
1 changed files with 8 additions and 0 deletions
|
|
@ -249,6 +249,10 @@ impl CosmicStack {
|
|||
window.set_tiled(false);
|
||||
|
||||
p.active.fetch_min(windows.len() - 1, Ordering::SeqCst);
|
||||
p.previous_index
|
||||
.lock()
|
||||
.unwrap()
|
||||
.take_if(|(_, idx)| *idx >= windows.len());
|
||||
});
|
||||
self.0
|
||||
.resize(Size::from((self.active().geometry().size.w, TAB_HEIGHT)));
|
||||
|
|
@ -276,6 +280,10 @@ impl CosmicStack {
|
|||
window.set_tiled(false);
|
||||
|
||||
p.active.fetch_min(windows.len() - 1, Ordering::SeqCst);
|
||||
p.previous_index
|
||||
.lock()
|
||||
.unwrap()
|
||||
.take_if(|(_, idx)| *idx >= windows.len());
|
||||
|
||||
Some(window)
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue