config: Add a window rule to render while unfocused (#7582)

This commit is contained in:
Vaxry
2024-08-30 17:37:52 +02:00
committed by GitHub
parent fbd6354393
commit c5fd577181
8 changed files with 73 additions and 1 deletions

View File

@@ -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();