From 1c16d43c1a6b5f23a83b07ebbc1a9c2cd21ea44c Mon Sep 17 00:00:00 2001 From: zhangkun2 Date: Mon, 30 Nov 2026 14:53:14 +0800 Subject: [PATCH] fix: close overflow popup when dock hides MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Root cause: onHideStateChanged handler only restarted hideTimer when hideState changed to Dock.Hide, but omitted calling Panel.requestClosePopup() to close the overflow popup 2. Fix: add Panel.requestClosePopup() call alongside hideTimer.restart() in the Dock.Hide branch, matching the pattern used by sibling handlers like onPositionChanged and onDockScreenChanged 3. Impact: overflow popup now closes when dock transitions to hidden state, no change to show/hide animation logic or normal display Log: 修复任务栏隐藏时溢出区域弹出层未关闭的问题 Influence: 1. Test overflow popup closes when dock hides with smart-hide mode 2. Test overflow popup still works normally when dock is visible 3. Verify dock show/hide animation is not affected 4. Test overflow popup closes when dock moves to another screen fix: 修复任务栏隐藏时溢出区域弹出层未关闭的问题 1. 根因:onHideStateChanged handler 在 hideState 变为 Dock.Hide 时 仅重启 hideTimer,遗漏了调用 Panel.requestClosePopup() 关闭溢出 区域弹出层 2. 方案:在 Dock.Hide 分支中补充 Panel.requestClosePopup() 调用, 与 onPositionChanged、onDockScreenChanged 等同级 handler 保持 一致的弹出层关闭行为 3. 影响:任务栏隐藏时溢出区域弹出层将正常关闭,不影响显示/隐藏 动画逻辑和正常显示行为 Log: 修复任务栏隐藏时溢出区域弹出层未关闭的问题 Influence: 1. 测试智能隐藏模式下任务栏隐藏时溢出区域弹出层是否关闭 2. 测试任务栏可见时溢出区域弹出层功能是否正常 3. 验证任务栏显示/隐藏动画不受影响 4. 测试任务栏切换屏幕时溢出区域弹出层是否关闭 PMS: BUG-384781 --- panels/dock/package/main.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/panels/dock/package/main.qml b/panels/dock/package/main.qml index bde239b72..aabeb1e96 100644 --- a/panels/dock/package/main.qml +++ b/panels/dock/package/main.qml @@ -774,6 +774,7 @@ Window { function onHideStateChanged() { if (Panel.hideState === Dock.Hide) { hideTimer.running = true + Panel.requestClosePopup() } else { // Only restart animation if not already running or if visible state doesn't match if (!hideShowAnimation.running || !dock.visible) {