From b9be405d326697df81f5bafd736b817b47aea3a1 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 3 Aug 2022 16:12:05 +0200 Subject: [PATCH] clear ls lists on monitor disconnect --- src/helpers/Monitor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index b01ccb14..e3b22e0d 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -163,6 +163,10 @@ void CMonitor::onDisconnect() { wlr_output_commit(output); + for (auto& lsl : m_aLayerSurfaceLists) { + lsl.clear(); + } + g_pCompositor->m_vWorkspaces.erase(std::remove_if(g_pCompositor->m_vWorkspaces.begin(), g_pCompositor->m_vWorkspaces.end(), [&](std::unique_ptr& el) { return el->m_iMonitorID == ID; })); Debug::log(LOG, "Removed monitor %s!", szName.c_str());