mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-05 12:25:59 +01:00
23 lines
No EOL
669 B
C++
23 lines
No EOL
669 B
C++
#include "WLClasses.hpp"
|
|
#include "../config/ConfigManager.hpp"
|
|
|
|
SLayerSurface::SLayerSurface() {
|
|
alpha.create(AVARTYPE_FLOAT, g_pConfigManager->getAnimationPropertyConfig("fadeIn"), nullptr, AVARDAMAGE_ENTIRE);
|
|
alpha.m_pLayer = this;
|
|
alpha.registerVar();
|
|
}
|
|
|
|
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;
|
|
}
|
|
} |