From 298d63bc71a3d9b161849259c8309f677e77f939 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 26 Feb 2023 15:11:09 +0200 Subject: [PATCH] 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. --- src/workspace.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/workspace.cpp b/src/workspace.cpp index ac8531e689..17585a1de2 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -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)) {