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:
Vaxry 2025-07-24 00:36:29 +02:00 committed by GitHub
parent ecc04e8ba7
commit 31cc7f3b87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 67 additions and 73 deletions

View file

@ -17,7 +17,7 @@ void CInputManager::onSwipeBegin(IPointer::SSwipeBeginEvent e) {
return;
int onMonitor = 0;
for (auto const& w : g_pCompositor->m_workspaces) {
for (auto const& w : g_pCompositor->getWorkspaces()) {
if (w->m_monitor == g_pCompositor->m_lastMonitor && !g_pCompositor->isWorkspaceSpecial(w->m_id))
onMonitor++;
}