Hyprland/src/helpers/WLClasses.cpp

23 lines
669 B
C++
Raw Normal View History

#include "WLClasses.hpp"
#include "../config/ConfigManager.hpp"
SLayerSurface::SLayerSurface() {
2022-07-28 13:28:43 +02:00
alpha.create(AVARTYPE_FLOAT, g_pConfigManager->getAnimationPropertyConfig("fadeIn"), nullptr, AVARDAMAGE_ENTIRE);
alpha.m_pLayer = this;
alpha.registerVar();
2023-03-18 00:16:13 +01:00
}
void SLayerSurface::applyRules() {
noAnimations = false;
forceBlur = false;
ignoreZero = false;
for (auto& rule : g_pConfigManager->getMatchingRules(this)) {
if (rule.rule == "noanim")
noAnimations = true;
else if (rule.rule == "blur")
forceBlur = true;
else if (rule.rule == "ignorezero")
ignoreZero = true;
}
}