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.
This commit is contained in:
parent
ecc04e8ba7
commit
31cc7f3b87
11 changed files with 67 additions and 73 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue