From 70585b9867777a0beeb5f8e92e2a4299f3daab0c Mon Sep 17 00:00:00 2001 From: wjyrich Date: Fri, 31 Oct 2025 13:06:09 +0800 Subject: [PATCH] fix: skip tooltip windows in dock event filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Added check to skip tooltip windows in DockHelper event filter 2. This prevents tooltip windows from interfering with dock behavior 3. Removed misleading comment from hideStateChanged signal 4. The signal is actually emitted but was incorrectly documented fix: 在停靠栏事件过滤器中跳过工具提示窗口 1. 在 DockHelper 事件过滤器中添加跳过工具提示窗口的检查 2. 防止工具提示窗口干扰停靠栏的行为 3. 移除 hideStateChanged 信号的误导性注释 4. 该信号实际上会被发出,但之前被错误地记录为不发出 PMS: BUG-338977 --- panels/dock/dockhelper.cpp | 5 +++++ panels/dock/dockpanel.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/panels/dock/dockhelper.cpp b/panels/dock/dockhelper.cpp index 463bd48c4..f3997ab66 100644 --- a/panels/dock/dockhelper.cpp +++ b/panels/dock/dockhelper.cpp @@ -67,6 +67,11 @@ bool DockHelper::eventFilter(QObject *watched, QEvent *event) return false; } + // skip tooltip windows + if (window->flags().testFlags(Qt::ToolTip)) { + return false; + } + auto topTransientParent = window; while (topTransientParent->transientParent()) { topTransientParent = topTransientParent->transientParent(); diff --git a/panels/dock/dockpanel.h b/panels/dock/dockpanel.h index bd5cbf297..f574e586b 100644 --- a/panels/dock/dockpanel.h +++ b/panels/dock/dockpanel.h @@ -109,7 +109,7 @@ private Q_SLOTS: Q_SIGNALS: void geometryChanged(QRect geometry); void frontendWindowRectChanged(QRect frontendWindowRect); - void hideStateChanged(HideState state); // not emitted + void hideStateChanged(HideState state); void colorThemeChanged(ColorTheme theme); void compositorReadyChanged();