From 7c4daee29a353fa7e800c4874ce6d491eda458c3 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Mon, 14 Aug 2023 19:27:33 +0200 Subject: [PATCH] compositor: fix skipping iterators in arrangeMonitors --- src/Compositor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 895b4bec..348ac584 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2493,7 +2493,7 @@ void CCompositor::arrangeMonitors() { for (auto& m : m_vMonitors) toArrange.push_back(m.get()); - for (auto it = toArrange.begin(); it != toArrange.end(); ++it) { + for (auto it = toArrange.begin(); it != toArrange.end();) { auto m = *it; if (m->activeMonitorRule.offset.x >= 0 && m->activeMonitorRule.offset.y >= 0) { @@ -2504,7 +2504,11 @@ void CCompositor::arrangeMonitors() { if (it == toArrange.end()) break; + + continue; } + + ++it; } // auto left