shadows: disable by default

This commit is contained in:
Vaxry 2024-03-05 20:28:29 +00:00
parent a4dc596cb8
commit 9b54840e12
2 changed files with 7 additions and 1 deletions

View file

@ -38,7 +38,7 @@ void CConfigManager::init() {
#define SHADOWABLE(name) \
m_config.addSpecialConfigValue(name, "shadow_size", Hyprlang::INT{3}); \
m_config.addSpecialConfigValue(name, "shadow_passes", Hyprlang::INT{2}); \
m_config.addSpecialConfigValue(name, "shadow_passes", Hyprlang::INT{0}); \
m_config.addSpecialConfigValue(name, "shadow_color", Hyprlang::INT{0xFF000000}); \
m_config.addSpecialConfigValue(name, "shadow_boost", Hyprlang::FLOAT{1.2});

View file

@ -10,6 +10,9 @@ CShadowable::CShadowable(IWidget* widget_, const std::unordered_map<std::string,
void CShadowable::markShadowDirty() {
if (passes == 0)
return;
if (!shadowFB.isAllocated())
shadowFB.alloc(viewport.x, viewport.y, true);
@ -27,6 +30,9 @@ void CShadowable::markShadowDirty() {
}
bool CShadowable::draw(const IWidget::SRenderData& data) {
if (passes == 0)
return;
if (!shadowFB.isAllocated() || ignoreDraw)
return true;