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/debug/HyprCtl.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/debug/HyprCtl.cpp')
| -rw-r--r-- | src/debug/HyprCtl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 30126a92..c8751d7e 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -432,16 +432,16 @@ static std::string workspacesRequest(eHyprCtlOutputFormat format, std::string re if (format == eHyprCtlOutputFormat::FORMAT_JSON) { result += "["; - for (auto const& w : g_pCompositor->m_workspaces) { - result += CHyprCtl::getWorkspaceData(w, format); + for (auto const& w : g_pCompositor->getWorkspaces()) { + result += CHyprCtl::getWorkspaceData(w.lock(), format); result += ","; } trimTrailingComma(result); result += "]"; } else { - for (auto const& w : g_pCompositor->m_workspaces) { - result += CHyprCtl::getWorkspaceData(w, format); + for (auto const& w : g_pCompositor->getWorkspaces()) { + result += CHyprCtl::getWorkspaceData(w.lock(), format); } } |
