mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-25 15:25:59 +01:00
Renamed rule from maxsize->maxclients
This commit is contained in:
parent
e21be1e977
commit
038c0c693b
3 changed files with 7 additions and 7 deletions
|
@ -1158,8 +1158,8 @@ 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("maxsize:")) != std::string::npos)
|
||||
wsRule.maxSize = configStringToInt(rule.substr(delim + 8));
|
||||
else if ((delim = rule.find("maxclients:")) != std::string::npos)
|
||||
wsRule.maxClients = configStringToInt(rule.substr(delim + 11));
|
||||
};
|
||||
|
||||
size_t pos = 0;
|
||||
|
|
|
@ -42,7 +42,7 @@ struct SWorkspaceRule {
|
|||
std::string workspaceName = "";
|
||||
int workspaceId = -1;
|
||||
bool isDefault = false;
|
||||
int maxSize = 0;
|
||||
int maxClients = 0;
|
||||
std::optional<int64_t> gapsIn;
|
||||
std::optional<int64_t> gapsOut;
|
||||
std::optional<int64_t> borderSize;
|
||||
|
|
|
@ -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 maxSize = workspaceRule.maxSize;
|
||||
if (maxSize != 0 && maxSize < g_pCompositor->getVisibleWindowsOnWorkspace(pWorkspace->m_iID)) {
|
||||
int maxClients = workspaceRule.maxClients;
|
||||
if (maxClients != 0 && maxClients < g_pCompositor->getVisibleWindowsOnWorkspace(pWorkspace->m_iID)) {
|
||||
if (pWorkspace->m_bIsSpecialWorkspace) {
|
||||
g_pCompositor->moveWindowToWorkspaceSafe(PWINDOW, g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace));
|
||||
PMONITOR->setSpecialWorkspace(nullptr);
|
||||
|
@ -586,8 +586,8 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
|||
|
||||
pWorkspace = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace);
|
||||
workspaceRule = pWorkspace ? g_pConfigManager->getWorkspaceRuleFor(pWorkspace) : SWorkspaceRule{};
|
||||
maxSize = workspaceRule.maxSize;
|
||||
if (maxSize != 0 && maxSize < g_pCompositor->getVisibleWindowsOnWorkspace(pWorkspace->m_iID)) {
|
||||
maxClients = workspaceRule.maxClients;
|
||||
if (maxClients != 0 && maxClients < g_pCompositor->getVisibleWindowsOnWorkspace(pWorkspace->m_iID)) {
|
||||
std::string requestedWorkspaceName;
|
||||
const int REQUESTEDWORKSPACEID = getWorkspaceIDFromString("empty", requestedWorkspaceName);
|
||||
// doesn't exist since it's empty
|
||||
|
|
Loading…
Reference in a new issue