diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-07-24 00:36:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-24 00:36:29 +0200 |
| commit | 31cc7f3b87d1d9670b66e73e3720da2e2da49acd (patch) | |
| tree | d39c0e974bbaab8e2622fb32c1b0b037f22d6db9 /src/helpers/MiscFunctions.cpp | |
| parent | ecc04e8ba7469fb01c5a066bf1c48d5cd58d1a18 (diff) | |
core: move workspace ptrs to weak (#11194)
Fixes some race conditions that come up in tests. We only clean up workspaces when we render a frame. With this, they are always cleared instantly.
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
| -rw-r--r-- | src/helpers/MiscFunctions.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index 8069d414..7fbeda35 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -219,7 +219,7 @@ SWorkspaceIDName getWorkspaceIDNameFromString(const std::string& in) { std::set<WORKSPACEID> invalidWSes; // Collect all the workspaces we can't jump to. - for (auto const& ws : g_pCompositor->m_workspaces) { + for (auto const& ws : g_pCompositor->getWorkspaces()) { if (ws->m_isSpecialWorkspace || (ws->m_monitor != g_pCompositor->m_lastMonitor)) { // Can't jump to this workspace invalidWSes.insert(ws->m_id); @@ -237,7 +237,7 @@ SWorkspaceIDName getWorkspaceIDNameFromString(const std::string& in) { // Prepare all named workspaces in case when we need them std::vector<WORKSPACEID> namedWSes; - for (auto const& ws : g_pCompositor->m_workspaces) { + for (auto const& ws : g_pCompositor->getWorkspaces()) { if (ws->m_isSpecialWorkspace || (ws->m_monitor != g_pCompositor->m_lastMonitor) || ws->m_id >= 0) continue; @@ -381,7 +381,7 @@ SWorkspaceIDName getWorkspaceIDNameFromString(const std::string& in) { int remains = (int)result.id; std::vector<WORKSPACEID> validWSes; - for (auto const& ws : g_pCompositor->m_workspaces) { + for (auto const& ws : g_pCompositor->getWorkspaces()) { if (ws->m_isSpecialWorkspace || (ws->m_monitor != g_pCompositor->m_lastMonitor && !onAllMonitors)) continue; |
