Skip to content

Commit 99268a8

Browse files
committed
fix: skip tooltip windows in dock event filter
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
1 parent 9a0d53f commit 99268a8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

panels/dock/dockhelper.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ bool DockHelper::eventFilter(QObject *watched, QEvent *event)
6767
return false;
6868
}
6969

70+
// skip tooltip windows
71+
if (window->flags().testFlags(Qt::ToolTip)) {
72+
return false;
73+
}
74+
7075
auto topTransientParent = window;
7176
while (topTransientParent->transientParent()) {
7277
topTransientParent = topTransientParent->transientParent();

panels/dock/dockpanel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ private Q_SLOTS:
109109
Q_SIGNALS:
110110
void geometryChanged(QRect geometry);
111111
void frontendWindowRectChanged(QRect frontendWindowRect);
112-
void hideStateChanged(HideState state); // not emitted
112+
void hideStateChanged(HideState state);
113113
void colorThemeChanged(ColorTheme theme);
114114
void compositorReadyChanged();
115115

0 commit comments

Comments
 (0)