From 9f4123cc3c29a36a2407ffb2703953641ad2af9d Mon Sep 17 00:00:00 2001 From: Rocho Date: Thu, 18 Jun 2026 06:58:19 +0200 Subject: [PATCH] fix(bar): clear blur region when the bar is hidden (auto-hide) (#2658) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- quickshell/Modules/DankBar/DankBarWindow.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/quickshell/Modules/DankBar/DankBarWindow.qml b/quickshell/Modules/DankBar/DankBarWindow.qml index 02a23513..45c414b3 100644 --- a/quickshell/Modules/DankBar/DankBarWindow.qml +++ b/quickshell/Modules/DankBar/DankBarWindow.qml @@ -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.