diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-07-28 22:08:05 +0200 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-07-28 22:08:05 +0200 |
| commit | abe29647ae9cf2e6bd40784790b3d99fcc962613 (patch) | |
| tree | c64372390f0319d0bcb119f16941856f7e6b8575 /src/helpers/Monitor.cpp | |
| parent | c63d0003a1e5155248695f19778f815a8ad34c67 (diff) | |
monitor: fix crash on mutating workspace vec
fixes #11236
Diffstat (limited to 'src/helpers/Monitor.cpp')
| -rw-r--r-- | src/helpers/Monitor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 63f1d147..87990009 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -216,12 +216,12 @@ void CMonitor::onConnect(bool noRule) { setupDefaultWS(monitorRule); - for (auto const& ws : g_pCompositor->getWorkspaces()) { - if (!valid(ws.lock())) + for (auto const& ws : g_pCompositor->getWorkspacesCopy()) { + if (!valid(ws)) continue; if (ws->m_lastMonitor == m_name || g_pCompositor->m_monitors.size() == 1 /* avoid lost workspaces on recover */) { - g_pCompositor->moveWorkspaceToMonitor(ws.lock(), m_self.lock()); + g_pCompositor->moveWorkspaceToMonitor(ws, m_self.lock()); ws->startAnim(true, true, true); ws->m_lastMonitor = ""; } |
