windowrules: rewrite completely (#12269)

Reworks the window rule syntax completely

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
This commit is contained in:
Vaxry 2025-11-17 18:34:02 +00:00 committed by GitHub
parent 95ee08b340
commit c2670e9ab9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
93 changed files with 3574 additions and 2255 deletions

View file

@ -161,6 +161,5 @@ std::string CHyprBorderDecoration::getDisplayName() {
}
bool CHyprBorderDecoration::doesntWantBorders() {
return m_window->m_windowData.noBorder.valueOrDefault() || m_window->m_X11DoesntWantBorders || m_window->getRealBorderSize() == 0 ||
!m_window->m_windowData.decorate.valueOrDefault();
return m_window->m_X11DoesntWantBorders || m_window->getRealBorderSize() == 0 || !m_window->m_ruleApplicator->decorate().valueOrDefault();
}

View file

@ -104,10 +104,10 @@ void CHyprDropShadowDecoration::render(PHLMONITOR pMonitor, float const& a) {
if (PWINDOW->m_realShadowColor->value() == CHyprColor(0, 0, 0, 0))
return; // don't draw invisible shadows
if (!PWINDOW->m_windowData.decorate.valueOrDefault())
if (!PWINDOW->m_ruleApplicator->decorate().valueOrDefault())
return;
if (PWINDOW->m_windowData.noShadow.valueOrDefault())
if (PWINDOW->m_ruleApplicator->noShadow().valueOrDefault())
return;
static auto PSHADOWS = CConfigValue<Hyprlang::INT>("decoration:shadow:enabled");

View file

@ -597,5 +597,5 @@ CBox CHyprGroupBarDecoration::assignedBoxGlobal() {
bool CHyprGroupBarDecoration::visible() {
static auto PENABLED = CConfigValue<Hyprlang::INT>("group:groupbar:enabled");
return *PENABLED && m_window->m_windowData.decorate.valueOrDefault();
return *PENABLED && m_window->m_ruleApplicator->decorate().valueOrDefault();
}