core: workspace-related function cleanup / refactor

CCompositor is massive, and has a lot of functions that could be better optimized if in CWorkspace
This commit is contained in:
Vaxry
2024-11-22 16:01:02 +00:00
parent a847bc67b1
commit 745a82ce8a
19 changed files with 267 additions and 260 deletions

View File

@@ -264,7 +264,7 @@ SWorkspaceIDName getWorkspaceIDNameFromString(const std::string& in) {
WORKSPACEID id = next ? g_pCompositor->m_pLastMonitor->activeWorkspaceID() : 0;
while (++id < LONG_MAX) {
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(id);
if (!invalidWSes.contains(id) && (!PWORKSPACE || g_pCompositor->getWindowsOnWorkspace(id) == 0)) {
if (!invalidWSes.contains(id) && (!PWORKSPACE || PWORKSPACE->getWindows() == 0)) {
result.id = id;
return result;
}