From a69cd515fba70636a3da00981eef3262427c7d42 Mon Sep 17 00:00:00 2001 From: purian23 Date: Sun, 1 Mar 2026 20:54:05 -0500 Subject: [PATCH] fix(dbar): Fixes autohide + click through edge case --- quickshell/Modules/DankBar/DankBarWindow.qml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/quickshell/Modules/DankBar/DankBarWindow.qml b/quickshell/Modules/DankBar/DankBarWindow.qml index bbacbd8d..e1ce8c32 100644 --- a/quickshell/Modules/DankBar/DankBarWindow.qml +++ b/quickshell/Modules/DankBar/DankBarWindow.qml @@ -552,8 +552,9 @@ PanelWindow { readonly property var _leftSection: topBarContent ? (barWindow.isVertical ? topBarContent.vLeftSection : topBarContent.hLeftSection) : null readonly property var _centerSection: topBarContent ? (barWindow.isVertical ? topBarContent.vCenterSection : topBarContent.hCenterSection) : null readonly property var _rightSection: topBarContent ? (barWindow.isVertical ? topBarContent.vRightSection : topBarContent.hRightSection) : null + readonly property real _revealProgress: topBarSlide.x + topBarSlide.y - function sectionRect(section, isCenter) { + function sectionRect(section, isCenter, _dep) { if (!section) return { "x": 0, @@ -582,7 +583,7 @@ PanelWindow { item: clickThroughEnabled ? null : inputMask Region { - readonly property var r: barWindow.clickThroughEnabled ? barWindow.sectionRect(barWindow._leftSection, false) : { + readonly property var r: barWindow.clickThroughEnabled ? barWindow.sectionRect(barWindow._leftSection, false, barWindow._revealProgress) : { "x": 0, "y": 0, "w": 0, @@ -595,7 +596,7 @@ PanelWindow { } Region { - readonly property var r: barWindow.clickThroughEnabled ? barWindow.sectionRect(barWindow._centerSection, true) : { + readonly property var r: barWindow.clickThroughEnabled ? barWindow.sectionRect(barWindow._centerSection, true, barWindow._revealProgress) : { "x": 0, "y": 0, "w": 0, @@ -608,7 +609,7 @@ PanelWindow { } Region { - readonly property var r: barWindow.clickThroughEnabled ? barWindow.sectionRect(barWindow._rightSection, false) : { + readonly property var r: barWindow.clickThroughEnabled ? barWindow.sectionRect(barWindow._rightSection, false, barWindow._revealProgress) : { "x": 0, "y": 0, "w": 0, @@ -619,6 +620,14 @@ PanelWindow { width: r.w height: r.h } + + Region { + readonly property bool active: barWindow.clickThroughEnabled && !inputMask.showing + x: active ? inputMask.x : 0 + y: active ? inputMask.y : 0 + width: active ? inputMask.width : 0 + height: active ? inputMask.height : 0 + } } Item { @@ -631,7 +640,7 @@ PanelWindow { Timer { id: revealHold - interval: barConfig?.autoHideDelay ?? 250 + interval: barWindow.clickThroughEnabled ? Math.max((barConfig?.autoHideDelay ?? 250) * 6, 1500) : (barConfig?.autoHideDelay ?? 250) repeat: false onTriggered: { if (!topBarMouseArea.containsMouse && !topBarCore.hasActivePopout) { @@ -689,7 +698,6 @@ PanelWindow { Connections { function onBarConfigChanged() { topBarCore.autoHide = barConfig?.autoHide ?? false; - revealHold.interval = barConfig?.autoHideDelay ?? 250; } target: rootWindow