-
Notifications
You must be signed in to change notification settings - Fork 55
fix: skip tooltip windows in dock event filter #1326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR updates the DockHelper event filter to ignore tooltip windows by checking for Qt::ToolTip flags and removes a misleading comment on the hideStateChanged signal, ensuring it’s correctly documented. Sequence diagram for DockHelper event filter handling tooltip windowssequenceDiagram
participant DockHelper
participant QObject
participant QWindow
participant QEvent
DockHelper->>QObject: eventFilter(watched, event)
QObject->>QWindow: get window from watched
QWindow->>DockHelper: window->flags()
DockHelper->>DockHelper: Check if flags include Qt::ToolTip
alt Tooltip window
DockHelper-->>QObject: return false (skip event)
else Not a tooltip window
DockHelper->>DockHelper: Continue event processing
end
Class diagram for DockPanel signal documentation updateclassDiagram
class DockPanel {
+geometryChanged(QRect geometry)
+frontendWindowRectChanged(QRect frontendWindowRect)
+hideStateChanged(HideState state)
+colorThemeChanged(ColorTheme theme)
+compositorReadyChanged()
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
9a7298f to
70585b9
Compare
deepin pr auto review我来对这两处代码修改进行分析:
// 新增代码
if (window->flags().testFlags(Qt::ToolTip)) {
return false;
}改进建议:
- void hideStateChanged(HideState state); // not emitted
+ void hideStateChanged(HideState state);改进建议:
总体建议:
这两处修改都是合理的改进,但建议在后续版本中补充相应的文档和测试。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, wjyrich The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
fix: 在停靠栏事件过滤器中跳过工具提示窗口
PMS: BUG-338977
Summary by Sourcery
Prevent tooltip windows from being handled by the DockHelper event filter and correct the documentation for the hideStateChanged signal.
Bug Fixes:
Enhancements: