mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-18 09:05:24 -04:00
fix(bar): clear blur region when the bar is hidden (auto-hide) (#2658)
When a bar with background transparency + blur uses auto-hide, the ext-background-effect-v1 blur region was only slid off-surface via the reveal Translate, but the region object stayed non-empty. Hyprland gates layer-surface blur on `!m_blurRegion.empty()`, so the non-empty region keeps blur enabled; the renderer then intersects the off-surface region with the surface box, the clip degenerates to empty, and an empty clip is treated as "unclipped" — so the whole bar surface box gets blurred, leaving a blurred strip where the hidden bar would be. (niri clips correctly, so it never showed there.) Gate the published blur region on `barRevealed`: tear it down (null) whenever the bar is not currently shown, so the region is genuinely empty and the compositor disables the effect. Fixes #2656.
This commit is contained in:
@@ -150,6 +150,9 @@ PanelWindow {
|
||||
function onUsesFrameBarChromeChanged() {
|
||||
_blurRebuildTimer.restart();
|
||||
}
|
||||
function onBarRevealedChanged() {
|
||||
_blurRebuildTimer.restart();
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
@@ -176,6 +179,13 @@ PanelWindow {
|
||||
teardown();
|
||||
if (!BlurService.enabled || !BlurService.available)
|
||||
return;
|
||||
// When the bar is hidden (auto-hide, or config not visible) keep the blur
|
||||
// region empty rather than sliding it off-surface. Some compositors (Hyprland)
|
||||
// gate blur on a non-empty region and then blur the whole surface box when the
|
||||
// clip degenerates to empty, leaving the bar strip blurred while the bar is
|
||||
// hidden (issue #2656). A null region disables the effect cleanly.
|
||||
if (!barWindow.barRevealed)
|
||||
return;
|
||||
// In frame mode, FrameWindow owns the blur region for the entire screen edge
|
||||
// (including the bar area). The bar must not set its own competing blur region
|
||||
// so that frameBlurEnabled acts as the single control for all blur in frame mode.
|
||||
|
||||
Reference in New Issue
Block a user