diff options
Diffstat (limited to 'src/events/Monitors.cpp')
| -rw-r--r-- | src/events/Monitors.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index 0412f43e..0ea64e67 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -241,7 +241,8 @@ void Events::listener_monitorFrame(void* owner, void* data) { // TODO: can this be optimized? static auto* const PBLURSIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_size")->intValue; static auto* const PBLURPASSES = &g_pConfigManager->getConfigValuePtr("decoration:blur_passes")->intValue; - const auto BLURRADIUS = *PBLURSIZE * pow(2, *PBLURPASSES); // is this 2^pass? I don't know but it works... I think. + const auto BLURRADIUS = + *PBLURPASSES > 10 ? pow(2, 15) : std::clamp(*PBLURSIZE, (int64_t)1, (int64_t)40) * pow(2, *PBLURPASSES); // is this 2^pass? I don't know but it works... I think. // now, prep the damage, get the extended damage region wlr_region_expand(&damage, &damage, BLURRADIUS); // expand for proper blurring |
