From dbb6d9d17421618901d3e7d985af1aee4414e537 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 28 Apr 2023 15:36:08 +0100 Subject: [PATCH] rules: add noinitialfocus --- src/config/ConfigManager.cpp | 3 ++- src/events/Windows.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 50c53f27..4a56f27e 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -787,7 +787,8 @@ bool windowRuleValid(const std::string& RULE) { RULE.find("maxsize") != 0 && RULE.find("pseudo") != 0 && RULE.find("monitor") != 0 && RULE.find("idleinhibit") != 0 && RULE != "nofocus" && RULE != "noblur" && RULE != "noshadow" && RULE != "noborder" && RULE != "center" && RULE != "opaque" && RULE != "forceinput" && RULE != "fullscreen" && RULE != "nofullscreenrequest" && RULE != "fakefullscreen" && RULE != "nomaxsize" && RULE != "pin" && RULE != "noanim" && RULE != "dimaround" && RULE != "windowdance" && RULE != "maximize" && - RULE.find("animation") != 0 && RULE.find("rounding") != 0 && RULE.find("workspace") != 0 && RULE.find("bordercolor") != 0 && RULE != "forcergbx"); + RULE.find("animation") != 0 && RULE.find("rounding") != 0 && RULE.find("workspace") != 0 && RULE.find("bordercolor") != 0 && RULE != "forcergbx" && + RULE != "noinitialfocus"); } bool layerRuleValid(const std::string& RULE) { diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 221c3e63..149899ea 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -179,6 +179,8 @@ void Events::listener_mapWindow(void* owner, void* data) { PWINDOW->m_bIsPseudotiled = true; } else if (r.szRule.find("nofocus") == 0) { PWINDOW->m_bNoFocus = true; + } else if (r.szRule.find("noinitialfocus") == 0) { + PWINDOW->m_bNoInitialFocus = true; } else if (r.szRule.find("nofullscreenrequest") == 0) { PWINDOW->m_bNoFullscreenRequest = true; } else if (r.szRule == "fullscreen") {