all: Window rules V3 Fixes (#541)

This commit is contained in:
nnra 2025-11-19 20:07:46 +01:00 committed by GitHub
parent 1bc5b0253f
commit 793d24e6b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 9 deletions

View file

@ -68,7 +68,7 @@ void CBordersPlusPlus::draw(PHLMONITOR pMonitor, const float& a) {
const auto PWINDOW = m_pWindow.lock(); const auto PWINDOW = m_pWindow.lock();
if (!PWINDOW->m_windowData.decorate.valueOrDefault()) if (!PWINDOW->m_ruleApplicator->decorate().valueOrDefault())
return; return;
CBorderPPPassElement::SBorderPPData data; CBorderPPPassElement::SBorderPPData data;

View file

@ -6,7 +6,7 @@
#include <hyprland/src/render/OpenGL.hpp> #include <hyprland/src/render/OpenGL.hpp>
#include <hyprland/src/devices/IPointer.hpp> #include <hyprland/src/devices/IPointer.hpp>
#include <hyprland/src/devices/ITouch.hpp> #include <hyprland/src/devices/ITouch.hpp>
#include <hyprland/src/desktop/WindowRule.hpp> #include <hyprland/src/desktop/rule/windowRule/WindowRule.hpp>
#include <hyprland/src/helpers/AnimatedVariable.hpp> #include <hyprland/src/helpers/AnimatedVariable.hpp>
#include <hyprland/src/helpers/time/Time.hpp> #include <hyprland/src/helpers/time/Time.hpp>
#include "globals.hpp" #include "globals.hpp"

View file

@ -52,15 +52,15 @@ static void onFocusChange(PHLWINDOW window) {
const auto POUT = g_pConfigManager->getAnimationPropertyConfig("hyprfocusOut"); const auto POUT = g_pConfigManager->getAnimationPropertyConfig("hyprfocusOut");
if (*PMODE == "flash") { if (*PMODE == "flash") {
const auto ORIGINAL = window->m_activeInactiveAlpha->goal();
window->m_activeInactiveAlpha->setConfig(PIN); window->m_activeInactiveAlpha->setConfig(PIN);
*window->m_activeInactiveAlpha = std::clamp(*POPACITY, 0.F, 1.F); *window->m_activeInactiveAlpha = std::clamp(*POPACITY, 0.F, 1.F);
window->m_activeInactiveAlpha->setCallbackOnEnd([w = PHLWINDOWREF{window}, POUT](WP<CBaseAnimatedVariable> pav) { window->m_activeInactiveAlpha->setCallbackOnEnd([w = PHLWINDOWREF{window}, POUT, ORIGINAL](WP<CBaseAnimatedVariable> pav) {
if (!w) if (!w)
return; return;
w->m_activeInactiveAlpha->setConfig(POUT); w->m_activeInactiveAlpha->setConfig(POUT);
g_pCompositor->updateWindowAnimatedDecorationValues(w.lock()); *w->m_activeInactiveAlpha = ORIGINAL;
w->updateDynamicRules();
w->m_activeInactiveAlpha->setCallbackOnEnd(nullptr); w->m_activeInactiveAlpha->setCallbackOnEnd(nullptr);
}); });

View file

@ -385,7 +385,7 @@ void CScrollingLayout::applyNodeDataToWindow(SP<SScrollingWindowData> data, bool
if (PWINDOW->isFullscreen() && !data->ignoreFullscreenChecks) if (PWINDOW->isFullscreen() && !data->ignoreFullscreenChecks)
return; return;
PWINDOW->unsetWindowData(PRIORITY_LAYOUT); PWINDOW->m_ruleApplicator->resetProps(Desktop::Rule::RULE_PROP_ALL, Desktop::Types::PRIORITY_LAYOUT);
PWINDOW->updateWindowData(); PWINDOW->updateWindowData();
static auto PGAPSINDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_in"); static auto PGAPSINDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_in");
@ -641,7 +641,7 @@ void CScrollingLayout::resizeActiveWindow(const Vector2D& delta, eRectCorner cor
if (!DATA) { if (!DATA) {
*PWINDOW->m_realSize = *PWINDOW->m_realSize =
(PWINDOW->m_realSize->goal() + delta) (PWINDOW->m_realSize->goal() + delta)
.clamp(PWINDOW->m_windowData.minSize.valueOr(Vector2D{MIN_WINDOW_SIZE, MIN_WINDOW_SIZE}), PWINDOW->m_windowData.maxSize.valueOr(Vector2D{INFINITY, INFINITY})); .clamp(PWINDOW->m_ruleApplicator->minSize().valueOr(Vector2D{MIN_WINDOW_SIZE, MIN_WINDOW_SIZE}), PWINDOW->m_ruleApplicator->maxSize().valueOr(Vector2D{INFINITY, INFINITY}));
PWINDOW->updateWindowDecos(); PWINDOW->updateWindowDecos();
return; return;
} }
@ -753,7 +753,7 @@ void CScrollingLayout::fullscreenRequestForWindow(PHLWINDOW pWindow, const eFull
*pWindow->m_realPosition = pWindow->m_lastFloatingPosition; *pWindow->m_realPosition = pWindow->m_lastFloatingPosition;
*pWindow->m_realSize = pWindow->m_lastFloatingSize; *pWindow->m_realSize = pWindow->m_lastFloatingSize;
pWindow->unsetWindowData(PRIORITY_LAYOUT); pWindow->m_ruleApplicator->resetProps(Desktop::Rule::RULE_PROP_ALL, Desktop::Types::PRIORITY_LAYOUT);
pWindow->updateWindowData(); pWindow->updateWindowData();
} }
} else { } else {

View file

@ -87,7 +87,7 @@ void CTrail::draw(PHLMONITOR pMonitor, const float& a) {
const auto PWINDOW = m_pWindow.lock(); const auto PWINDOW = m_pWindow.lock();
if (!PWINDOW->m_windowData.decorate.valueOrDefault()) if (!PWINDOW->m_ruleApplicator->decorate().valueOrDefault())
return; return;
auto data = CTrailPassElement::STrailData{this, a}; auto data = CTrailPassElement::STrailData{this, a};