Skip to content

Commit

Permalink
camel
Browse files Browse the repository at this point in the history
  • Loading branch information
nnyyxxxx committed Feb 25, 2025
1 parent df75bf1 commit 2256cb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/desktop/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1329,8 +1329,8 @@ void CWindow::clampWindowSize(const std::optional<Vector2D> minSize, const std::
*m_vRealPosition = m_vRealPosition->goal() + DELTA / 2.0;
*m_vRealSize = NEWSIZE;

if (m_bIsFloating && !m_bIsX11 && std::any_of(m_vMatchedRules.begin(), m_vMatchedRules.end(), [](const auto& r) { return r->ruleType == CWindowRule::RULE_PERSISTENT_SIZE; })) {
Debug::log(LOG, "clamped window {}::{} to {}x{} (persistent_size)", m_szClass, m_szTitle, m_vRealSize->value().x, m_vRealSize->value().y);
if (m_bIsFloating && !m_bIsX11 && std::any_of(m_vMatchedRules.begin(), m_vMatchedRules.end(), [](const auto& r) { return r->ruleType == CWindowRule::RULE_PERSISTENTSIZE; })) {
Debug::log(LOG, "clamped window {}::{} to {}x{} (persistentsize)", m_szClass, m_szTitle, m_vRealSize->value().x, m_vRealSize->value().y);
g_pConfigManager->storeFloatingSize(m_szClass, m_szTitle, m_vRealSize->value());
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/desktop/WindowRule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "../config/ConfigManager.hpp"

static const auto RULES = std::unordered_set<std::string>{
"float", "fullscreen", "maximize", "persistent_size", "noinitialfocus", "pin", "stayfocused", "tile", "renderunfocused",
"float", "fullscreen", "maximize", "persistentsize", "noinitialfocus", "pin", "stayfocused", "tile", "renderunfocused",
};
static const auto RULES_PREFIX = std::unordered_set<std::string>{
"animation", "bordercolor", "bordersize", "center", "content", "fullscreenstate", "group", "idleinhibit", "maxsize", "minsize",
Expand All @@ -29,8 +29,8 @@ CWindowRule::CWindowRule(const std::string& rule, const std::string& value, bool
ruleType = RULE_FULLSCREEN;
else if (rule == "maximize")
ruleType = RULE_MAXIMIZE;
else if (rule == "persistent_size")
ruleType = RULE_PERSISTENT_SIZE;
else if (rule == "persistentsize")
ruleType = RULE_PERSISTENTSIZE;
else if (rule == "noinitialfocus")
ruleType = RULE_NOINITIALFOCUS;
else if (rule == "pin")
Expand Down

0 comments on commit 2256cb4

Please sign in to comment.