stack: Fix missing re-enter on add
This commit is contained in:
parent
e2ac5c0a23
commit
6b4eb83af5
1 changed files with 6 additions and 1 deletions
|
|
@ -180,7 +180,12 @@ impl CosmicStack {
|
||||||
window.send_configure();
|
window.send_configure();
|
||||||
if let Some(idx) = idx {
|
if let Some(idx) = idx {
|
||||||
p.windows.lock().unwrap().insert(idx, window);
|
p.windows.lock().unwrap().insert(idx, window);
|
||||||
p.active.store(idx, Ordering::SeqCst);
|
let old_idx = p.active.swap(idx, Ordering::SeqCst);
|
||||||
|
if old_idx == idx {
|
||||||
|
p.reenter.store(true, Ordering::SeqCst);
|
||||||
|
p.previous_keyboard.store(old_idx, Ordering::SeqCst);
|
||||||
|
p.previous_pointer.store(old_idx, Ordering::SeqCst);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
let mut windows = p.windows.lock().unwrap();
|
let mut windows = p.windows.lock().unwrap();
|
||||||
windows.push(window);
|
windows.push(window);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue