Remove no longer relevant case in Workspace::replaceInStack()

Unmanaged windows are always in the stack now, so the else branch is not
needed, and in fact, it can produce undesired side effects if unmapped
window is closed.
master
Vlad Zahorodnii 2 years ago
parent 6745cb87ec
commit 298d63bc71

@ -854,17 +854,11 @@ void Workspace::replaceInStack(Window *original, Deleted *deleted)
const int unconstraintedIndex = unconstrained_stacking_order.indexOf(original);
if (unconstraintedIndex != -1) {
unconstrained_stacking_order.replace(unconstraintedIndex, deleted);
} else {
// This can be the case only if an override-redirect window is unmapped.
unconstrained_stacking_order.append(deleted);
}
const int index = stacking_order.indexOf(original);
if (index != -1) {
stacking_order.replace(index, deleted);
} else {
// This can be the case only if an override-redirect window is unmapped.
stacking_order.append(deleted);
}
for (Constraint *constraint : std::as_const(m_constraints)) {

Loading…
Cancel
Save