diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-03-03 18:39:20 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-03-03 18:41:38 +0000 |
| commit | 063708df26e8b930f492200e1907eb47950f50e6 (patch) | |
| tree | 31648b7148213ecb9c6d469148ac1c5061835d5a /src/desktop/Subsurface.cpp | |
| parent | 8ccbd272cc5f3a98280d4e050f456d25aee47ee5 (diff) | |
config: improve config value infrastructure
Diffstat (limited to 'src/desktop/Subsurface.cpp')
| -rw-r--r-- | src/desktop/Subsurface.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/desktop/Subsurface.cpp b/src/desktop/Subsurface.cpp index 74ae7748..d9aa3d6d 100644 --- a/src/desktop/Subsurface.cpp +++ b/src/desktop/Subsurface.cpp @@ -1,6 +1,7 @@ #include "Subsurface.hpp" #include "../events/Events.hpp" #include "../Compositor.hpp" +#include "../config/ConfigValue.hpp" static void onNewSubsurface(void* owner, void* data); @@ -119,8 +120,8 @@ void CSubsurface::onCommit() { if (!g_pHyprRenderer->shouldRenderWindow(m_pWindowParent)) { m_vLastSize = Vector2D{m_sWLSurface.wlr()->current.width, m_sWLSurface.wlr()->current.height}; - static auto* const PLOGDAMAGE = (Hyprlang::INT* const*)g_pConfigManager->getConfigValuePtr("debug:log_damage"); - if (**PLOGDAMAGE) + static auto PLOGDAMAGE = CConfigValue<Hyprlang::INT>("debug:log_damage"); + if (*PLOGDAMAGE) Debug::log(LOG, "Refusing to commit damage from a subsurface of {} because it's invisible.", m_pWindowParent); return; } |
