fix: only activate the active window of the stack on activation
This commit is contained in:
parent
4cf612dd22
commit
f2d6f70e13
1 changed files with 15 additions and 5 deletions
|
|
@ -352,10 +352,16 @@ impl CosmicStack {
|
||||||
}
|
}
|
||||||
FocusDirection::In if swap.is_none() => {
|
FocusDirection::In if swap.is_none() => {
|
||||||
if !p.group_focused.swap(false, Ordering::SeqCst) {
|
if !p.group_focused.swap(false, Ordering::SeqCst) {
|
||||||
p.windows.lock().unwrap().iter().for_each(|w| {
|
p.windows
|
||||||
w.set_activated(true);
|
.lock()
|
||||||
w.send_configure();
|
.unwrap()
|
||||||
});
|
.iter()
|
||||||
|
.enumerate()
|
||||||
|
.for_each(|(i, w)| {
|
||||||
|
w.set_activated(p.active.load(Ordering::SeqCst) == i);
|
||||||
|
w.send_configure();
|
||||||
|
});
|
||||||
|
|
||||||
(true, true)
|
(true, true)
|
||||||
} else {
|
} else {
|
||||||
(false, false)
|
(false, false)
|
||||||
|
|
@ -1162,7 +1168,11 @@ impl SpaceElement for CosmicStack {
|
||||||
.lock()
|
.lock()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.iter()
|
.iter()
|
||||||
.for_each(|w| SpaceElement::set_activate(w, activated))
|
.enumerate()
|
||||||
|
.for_each(|(i, w)| {
|
||||||
|
w.set_activated(activated && p.active.load(Ordering::SeqCst) == i);
|
||||||
|
w.send_configure();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
p.activated.swap(activated, Ordering::SeqCst) != activated
|
p.activated.swap(activated, Ordering::SeqCst) != activated
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue