diff --git a/src/Window.cpp b/src/Window.cpp index a1746fbc..ce3ee967 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -145,16 +145,22 @@ void CWindow::updateWindowDecos() { for (auto& wd : m_dWindowDecorations) wd->updateWindow(this); + bool recalc = false; + for (auto& wd : m_vDecosToRemove) { for (auto it = m_dWindowDecorations.begin(); it != m_dWindowDecorations.end(); it++) { if (it->get() == wd) { - it = m_dWindowDecorations.erase(it); + it = m_dWindowDecorations.erase(it); + recalc = true; if (it == m_dWindowDecorations.end()) break; } } } + if (recalc) + g_pLayoutManager->getCurrentLayout()->recalculateWindow(this); + m_vDecosToRemove.clear(); }