aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/desktop
diff options
context:
space:
mode:
authorVaxry <[email protected]>2024-08-30 17:37:52 +0200
committerGitHub <[email protected]>2024-08-30 17:37:52 +0200
commitc5fd5771814958ad274ea9abb961fff621a35b9c (patch)
treee955a8465ef0b8680603b8f7860b012b2991a09f /src/desktop
parentfbd63543930417f3cefe36bdb9f2cdd20fc3693a (diff)
downloadHyprland-c5fd5771814958ad274ea9abb961fff621a35b9c.tar.gz
Hyprland-c5fd5771814958ad274ea9abb961fff621a35b9c.zip
config: Add a window rule to render while unfocused (#7582)
Diffstat (limited to 'src/desktop')
-rw-r--r--src/desktop/Window.cpp5
-rw-r--r--src/desktop/Window.hpp1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp
index 7623d45e..a9e389a6 100644
--- a/src/desktop/Window.cpp
+++ b/src/desktop/Window.cpp
@@ -757,6 +757,9 @@ void CWindow::applyDynamicRule(const SWindowRule& r) {
if (m_sGroupData.pNextWindow.expired())
setHidden(false);
} catch (std::exception& e) { Debug::log(ERR, "minsize rule \"{}\" failed with: {}", r.szRule, e.what()); }
+ } else if (r.szRule == "renderunfocused") {
+ m_sWindowData.renderUnfocused = CWindowOverridableVar(true, priority);
+ g_pHyprRenderer->addWindowToRenderUnfocused(m_pSelf.lock());
}
}
@@ -774,6 +777,8 @@ void CWindow::updateDynamicRules() {
m_sWindowData.activeBorderColor.unset(PRIORITY_WINDOW_RULE);
m_sWindowData.inactiveBorderColor.unset(PRIORITY_WINDOW_RULE);
+ m_sWindowData.renderUnfocused.unset(PRIORITY_WINDOW_RULE);
+
m_eIdleInhibitMode = IDLEINHIBIT_NONE;
m_tags.removeDynamicTags();
diff --git a/src/desktop/Window.hpp b/src/desktop/Window.hpp
index 7197ba26..d14248c5 100644
--- a/src/desktop/Window.hpp
+++ b/src/desktop/Window.hpp
@@ -174,6 +174,7 @@ struct SWindowData {
CWindowOverridableVar<bool> syncFullscreen = true;
CWindowOverridableVar<bool> tearing = false;
CWindowOverridableVar<bool> xray = false;
+ CWindowOverridableVar<bool> renderUnfocused = false;
CWindowOverridableVar<int> rounding;
CWindowOverridableVar<int> borderSize;