From 31cc7f3b87d1d9670b66e73e3720da2e2da49acd Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Thu, 24 Jul 2025 00:36:29 +0200 Subject: 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. --- src/desktop/Workspace.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/desktop/Workspace.cpp') diff --git a/src/desktop/Workspace.cpp b/src/desktop/Workspace.cpp index b6320f05..49882534 100644 --- a/src/desktop/Workspace.cpp +++ b/src/desktop/Workspace.cpp @@ -13,6 +13,7 @@ using namespace Hyprutils::String; PHLWORKSPACE CWorkspace::create(WORKSPACEID id, PHLMONITOR monitor, std::string name, bool special, bool isEmpty) { PHLWORKSPACE workspace = makeShared(id, monitor, name, special, isEmpty); workspace->init(workspace); + g_pCompositor->registerWorkspace(workspace); return workspace; } -- cgit v1.2.3