From 6f5b8425cb7b7304dcce9a48e613d87538bd33d2 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 5 Jul 2022 17:31:47 +0200 Subject: fix invalidating the deque in CHyprGroupBarDeco --- src/Window.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/Window.cpp') diff --git a/src/Window.cpp b/src/Window.cpp index fc09b330..6b264b6f 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -77,6 +77,18 @@ wlr_box CWindow::getWindowIdealBoundingBoxIgnoreReserved() { void CWindow::updateWindowDecos() { for (auto& wd : m_dWindowDecorations) wd->updateWindow(this); + + 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); + if (it == m_dWindowDecorations.end()) + break; + } + } + } + + m_vDecosToRemove.clear(); } pid_t CWindow::getPID() { -- cgit v1.2.3