mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-25 17:26:00 +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);
|
wsRule.monitor = rule.substr(delim + 8);
|
||||||
else if ((delim = rule.find("default:")) != std::string::npos)
|
else if ((delim = rule.find("default:")) != std::string::npos)
|
||||||
wsRule.isDefault = configStringToInt(rule.substr(delim + 8));
|
wsRule.isDefault = configStringToInt(rule.substr(delim + 8));
|
||||||
else if ((delim = rule.find("maxsize:")) != std::string::npos)
|
else if ((delim = rule.find("maxclients:")) != std::string::npos)
|
||||||
wsRule.maxSize = configStringToInt(rule.substr(delim + 8));
|
wsRule.maxClients = configStringToInt(rule.substr(delim + 11));
|
||||||
};
|
};
|
||||||
|
|
||||||
size_t pos = 0;
|
size_t pos = 0;
|
||||||
|
|
|
@ -42,7 +42,7 @@ struct SWorkspaceRule {
|
||||||
std::string workspaceName = "";
|
std::string workspaceName = "";
|
||||||
int workspaceId = -1;
|
int workspaceId = -1;
|
||||||
bool isDefault = false;
|
bool isDefault = false;
|
||||||
int maxSize = 0;
|
int maxClients = 0;
|
||||||
std::optional<int64_t> gapsIn;
|
std::optional<int64_t> gapsIn;
|
||||||
std::optional<int64_t> gapsOut;
|
std::optional<int64_t> gapsOut;
|
||||||
std::optional<int64_t> borderSize;
|
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{};
|
auto workspaceRule = pWorkspace ? g_pConfigManager->getWorkspaceRuleFor(pWorkspace) : SWorkspaceRule{};
|
||||||
const auto PMONITOR = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID);
|
const auto PMONITOR = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID);
|
||||||
|
|
||||||
int maxSize = workspaceRule.maxSize;
|
int maxClients = workspaceRule.maxClients;
|
||||||
if (maxSize != 0 && maxSize < g_pCompositor->getVisibleWindowsOnWorkspace(pWorkspace->m_iID)) {
|
if (maxClients != 0 && maxClients < g_pCompositor->getVisibleWindowsOnWorkspace(pWorkspace->m_iID)) {
|
||||||
if (pWorkspace->m_bIsSpecialWorkspace) {
|
if (pWorkspace->m_bIsSpecialWorkspace) {
|
||||||
g_pCompositor->moveWindowToWorkspaceSafe(PWINDOW, g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace));
|
g_pCompositor->moveWindowToWorkspaceSafe(PWINDOW, g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace));
|
||||||
PMONITOR->setSpecialWorkspace(nullptr);
|
PMONITOR->setSpecialWorkspace(nullptr);
|
||||||
|
@ -586,8 +586,8 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
||||||
|
|
||||||
pWorkspace = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace);
|
pWorkspace = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace);
|
||||||
workspaceRule = pWorkspace ? g_pConfigManager->getWorkspaceRuleFor(pWorkspace) : SWorkspaceRule{};
|
workspaceRule = pWorkspace ? g_pConfigManager->getWorkspaceRuleFor(pWorkspace) : SWorkspaceRule{};
|
||||||
maxSize = workspaceRule.maxSize;
|
maxClients = workspaceRule.maxClients;
|
||||||
if (maxSize != 0 && maxSize < g_pCompositor->getVisibleWindowsOnWorkspace(pWorkspace->m_iID)) {
|
if (maxClients != 0 && maxClients < g_pCompositor->getVisibleWindowsOnWorkspace(pWorkspace->m_iID)) {
|
||||||
std::string requestedWorkspaceName;
|
std::string requestedWorkspaceName;
|
||||||
const int REQUESTEDWORKSPACEID = getWorkspaceIDFromString("empty", requestedWorkspaceName);
|
const int REQUESTEDWORKSPACEID = getWorkspaceIDFromString("empty", requestedWorkspaceName);
|
||||||
// doesn't exist since it's empty
|
// doesn't exist since it's empty
|
||||||
|
|
Loading…
Reference in a new issue