diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index 49cce6bc5ee..46225a04c64 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -1329,8 +1329,8 @@ void CWindow::clampWindowSize(const std::optional 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()); } } diff --git a/src/desktop/WindowRule.cpp b/src/desktop/WindowRule.cpp index 931149c91af..f2d6305d1c4 100644 --- a/src/desktop/WindowRule.cpp +++ b/src/desktop/WindowRule.cpp @@ -5,7 +5,7 @@ #include "../config/ConfigManager.hpp" static const auto RULES = std::unordered_set{ - "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{ "animation", "bordercolor", "bordersize", "center", "content", "fullscreenstate", "group", "idleinhibit", "maxsize", "minsize", @@ -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")