diff options
| author | davc0n <dconti.dev@gmail.com> | 2025-04-30 23:45:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-30 23:45:20 +0200 |
| commit | 50e1bec85f8febdd78f50d94f140d07f9b34148d (patch) | |
| tree | ac8f53553ef3ca5dedb956a09442a23f762e0428 /src/helpers/MiscFunctions.cpp | |
| parent | b8a204c21d6b36a5b3ccf4c125553c61a9fd6b90 (diff) | |
helpers: refactor class member vars (#10218)
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
| -rw-r--r-- | src/helpers/MiscFunctions.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index bb5510b6..ed67618e 100644 --- a/src/helpers/MiscFunctions.cpp +++ b/src/helpers/MiscFunctions.cpp @@ -148,7 +148,7 @@ SWorkspaceIDName getWorkspaceIDNameFromString(const std::string& in) { if (same_mon) { for (auto const& rule : g_pConfigManager->getAllWorkspaceRules()) { const auto PMONITOR = g_pCompositor->getMonitorFromName(rule.monitor); - if (PMONITOR && (PMONITOR->ID != g_pCompositor->m_lastMonitor->ID)) + if (PMONITOR && (PMONITOR->m_id != g_pCompositor->m_lastMonitor->m_id)) invalidWSes.insert(rule.workspaceId); } } @@ -165,7 +165,7 @@ SWorkspaceIDName getWorkspaceIDNameFromString(const std::string& in) { if (!g_pCompositor->m_lastMonitor) return {WORKSPACE_INVALID}; - const auto PWORKSPACE = g_pCompositor->m_lastMonitor->activeWorkspace; + const auto PWORKSPACE = g_pCompositor->m_lastMonitor->m_activeWorkspace; if (!valid(PWORKSPACE)) return {WORKSPACE_INVALID}; @@ -184,12 +184,12 @@ SWorkspaceIDName getWorkspaceIDNameFromString(const std::string& in) { return {PLASTWORKSPACE->m_id, PLASTWORKSPACE->m_name}; } else if (in == "next") { - if (!g_pCompositor->m_lastMonitor || !g_pCompositor->m_lastMonitor->activeWorkspace) { + if (!g_pCompositor->m_lastMonitor || !g_pCompositor->m_lastMonitor->m_activeWorkspace) { Debug::log(ERR, "no active monitor or workspace for 'next'"); return {WORKSPACE_INVALID}; } - auto PCURRENTWORKSPACE = g_pCompositor->m_lastMonitor->activeWorkspace; + auto PCURRENTWORKSPACE = g_pCompositor->m_lastMonitor->m_activeWorkspace; WORKSPACEID nextId = PCURRENTWORKSPACE->m_id + 1; @@ -227,7 +227,7 @@ SWorkspaceIDName getWorkspaceIDNameFromString(const std::string& in) { } for (auto const& rule : g_pConfigManager->getAllWorkspaceRules()) { const auto PMONITOR = g_pCompositor->getMonitorFromName(rule.monitor); - if (!PMONITOR || PMONITOR->ID == g_pCompositor->m_lastMonitor->ID) { + if (!PMONITOR || PMONITOR->m_id == g_pCompositor->m_lastMonitor->m_id) { // Can't be invalid continue; } @@ -265,7 +265,7 @@ SWorkspaceIDName getWorkspaceIDNameFromString(const std::string& in) { } else { // Just take a blind guess at where we'll probably end up - WORKSPACEID activeWSID = g_pCompositor->m_lastMonitor->activeWorkspace ? g_pCompositor->m_lastMonitor->activeWorkspace->m_id : 1; + WORKSPACEID activeWSID = g_pCompositor->m_lastMonitor->m_activeWorkspace ? g_pCompositor->m_lastMonitor->m_activeWorkspace->m_id : 1; WORKSPACEID predictedWSID = activeWSID + remains; int remainingWSes = 0; char walkDir = in[1]; @@ -407,7 +407,7 @@ SWorkspaceIDName getWorkspaceIDNameFromString(const std::string& in) { remains = remains < 0 ? -((-remains) % validWSes.size()) : remains % validWSes.size(); // get the current item - WORKSPACEID activeWSID = g_pCompositor->m_lastMonitor->activeWorkspace ? g_pCompositor->m_lastMonitor->activeWorkspace->m_id : 1; + WORKSPACEID activeWSID = g_pCompositor->m_lastMonitor->m_activeWorkspace ? g_pCompositor->m_lastMonitor->m_activeWorkspace->m_id : 1; for (ssize_t i = 0; i < (ssize_t)validWSes.size(); i++) { if (validWSes[i] == activeWSID) { currentItem = i; |
