diff --git a/src/Compositor.hpp b/src/Compositor.hpp index 8482ed33..af0b54a4 100644 --- a/src/Compositor.hpp +++ b/src/Compositor.hpp @@ -28,8 +28,7 @@ #include "hyprerror/HyprError.hpp" #include "plugins/PluginSystem.hpp" -enum eManagersInitStage -{ +enum eManagersInitStage { STAGE_PRIORITY = 0, STAGE_LATE }; diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 2678da4c..50136f79 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1158,16 +1158,15 @@ void CConfigManager::handleWorkspaceRules(const std::string& command, const std: wsRule.monitor = rule.substr(delim + 8); else if ((delim = rule.find("default:")) != std::string::npos) wsRule.isDefault = configStringToInt(rule.substr(delim + 8)); - else if ((delim = rule.find("maxclients:")) != std::string::npos){ + else if ((delim = rule.find("maxclients:")) != std::string::npos) { size_t silent = rule.find("silent"); - if (silent != std::string::npos) { - wsRule.maxClientsSilent = true; - wsRule.maxClients = configStringToInt(rule.substr(delim + 11, silent)); - } else { - wsRule.maxClients = configStringToInt(rule.substr(delim + 11)); - } + if (silent != std::string::npos) { + wsRule.maxClientsSilent = true; + wsRule.maxClients = configStringToInt(rule.substr(delim + 11, silent)); + } else { + wsRule.maxClients = configStringToInt(rule.substr(delim + 11)); + } } - }; size_t pos = 0; diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 2b3296bb..59083270 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -577,8 +577,8 @@ void Events::listener_mapWindow(void* owner, void* data) { auto workspaceRule = pWorkspace ? g_pConfigManager->getWorkspaceRuleFor(pWorkspace) : SWorkspaceRule{}; const auto PMONITOR = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID); - int maxClients = workspaceRule.maxClients; - bool maxClientsSilent = workspaceRule.maxClientsSilent; + int maxClients = workspaceRule.maxClients; + bool maxClientsSilent = workspaceRule.maxClientsSilent; if (maxClients != 0 && maxClients < g_pCompositor->getVisibleWindowsOnWorkspace(pWorkspace->m_iID)) { if (pWorkspace->m_bIsSpecialWorkspace) { g_pCompositor->moveWindowToWorkspaceSafe(PWINDOW, g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace)); @@ -588,7 +588,7 @@ void Events::listener_mapWindow(void* owner, void* data) { pWorkspace = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace); workspaceRule = pWorkspace ? g_pConfigManager->getWorkspaceRuleFor(pWorkspace) : SWorkspaceRule{}; - maxClients = workspaceRule.maxClients; + maxClients = workspaceRule.maxClients; if (maxClients != 0 && maxClients < g_pCompositor->getVisibleWindowsOnWorkspace(pWorkspace->m_iID)) { std::string requestedWorkspaceName; const int REQUESTEDWORKSPACEID = getWorkspaceIDFromString("empty", requestedWorkspaceName); @@ -596,15 +596,15 @@ void Events::listener_mapWindow(void* owner, void* data) { pWorkspace = g_pCompositor->createNewWorkspace(REQUESTEDWORKSPACEID, PWINDOW->m_iMonitorID, requestedWorkspaceName); g_pCompositor->moveWindowToWorkspaceSafe(PWINDOW, pWorkspace); if (!maxClientsSilent) - g_pKeybindManager->m_mDispatchers["workspace"](pWorkspace->m_szName); + g_pKeybindManager->m_mDispatchers["workspace"](pWorkspace->m_szName); } if (maxClientsSilent) { if (g_pCompositor->windowValidMapped(PFOCUSEDWINDOWPREV)) { - g_pCompositor->focusWindow(PFOCUSEDWINDOWPREV); - PFOCUSEDWINDOWPREV->updateWindowDecos(); + g_pCompositor->focusWindow(PFOCUSEDWINDOWPREV); + PFOCUSEDWINDOWPREV->updateWindowDecos(); } else if (!PFOCUSEDWINDOWPREV) - g_pCompositor->focusWindow(nullptr); + g_pCompositor->focusWindow(nullptr); } } }