fix: fix launcher not showing after popup menu on x11 - #1689
Conversation
1. When a popup menu is open and the launcher is triggered via shortcut on X11, the launcher does not display on the first attempt 2. The issue occurs because popupWindow.active state changes asynchronously and the immediate check in activeChanged handler can miss the transition 3. Wrap the active state check in Qt.callLater to defer the evaluation until after the event loop processes the state change 4. Add a null check for popupWindow to handle potential destruction during the delayed callback Log: Fixed launcher not displaying on first shortcut trigger after popup menu on X11 Influence: 1. Open a popup menu, then press the launcher shortcut and verify the launcher displays immediately 2. Repeat the operation multiple times to confirm consistent behavior 3. Test without popup menu open to ensure no regression in normal launcher activation 4. Verify on X11 session with different window manager configurations fix: 修复x11下弹出菜单后启动器首次不显示的问题 1. 在X11环境下,弹出菜单后通过快捷键启动小启动器时,第一次操作小启动器不 显示 2. 问题原因在于popupWindow.active状态是异步变化的,在activeChanged处理器 中立即检查会错过状态转换 3. 将active状态检查包装在Qt.callLater中,延迟到事件循环处理完状态变化后 再评估 4. 增加popupWindow的空指针检查,处理延迟回调期间窗口可能被销毁的情况 Log: 修复X11下弹出菜单后首次通过快捷键启动器不显示的问题 Influence: 1. 打开弹出菜单后,按下启动器快捷键,验证启动器立即显示 2. 重复多次操作,确认行为一致性 3. 在不打开弹出菜单的情况下测试,确保正常启动器激活功能无回归 4. 在不同的窗口管理器配置下验证X11会话中的表现
There was a problem hiding this comment.
Sorry @18202781743, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
Reviewer's guide (collapsed on small PRs)Reviewer's GuideDefers the popupWindow.active check in PanelPopup to the next event loop tick and adds a null/active guard so the launcher closes correctly after popup menus on X11 without missing asynchronous state changes. Sequence diagram for deferred popupWindow.active check with Qt.callLatersequenceDiagram
participant PopupWindow
participant PanelPopup
participant Qt
participant control
activate PopupWindow
PopupWindow->>PanelPopup: activeChanged
PanelPopup->>Qt: callLater(callback)
deactivate PopupWindow
Qt-->>PanelPopup: callback()
PanelPopup->>PanelPopup: [!popupWindow or popupWindow.active]
alt popupWindow is null or active
PanelPopup->>PanelPopup: return
else popupWindow inactive
PanelPopup->>control: close()
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review1. **分析请求:** * **角色:** UOS操作系统的代码审核助手。 * **任务:** 严格按照指定格式对提供的QML代码diff进行深度审核。使用中文作答。 * **输入上下文:** 提示词中提供的 `` 标签为空(包含关于达到最大迭代限制的错误信息)。`` 标签包含 `${sast_check_result}` 和 `${last_sast_check_result}` 的占位符,这意味着没有实际的SAST结果或历史数据。 * **约束条件:** * 绝对禁止输出方括号包裹的文字,如 `[总体判断]`。 * 绝对禁止输出过渡性词语("以下是..."、"首先..."等)。 * 绝对禁止输出模板标记本身("总体判断"、"展开说明"、"潜在问题")。 * 绝对禁止输出思考过程或元信息。 * 严格的字符限制:最多18000个字符。 * 严格的格式要求:必须使用特定的符号(☀、★、■、>、-、✓、✕)。 * 强制绑定规则:评价词必须与 ✓/✕ 标记正确匹配。 * 安全漏洞格式:必须编号,以"——非常重要"结尾,包含等级【严重/高危/中危/低危】。 * 漏洞对比:必须包含对比统计行。由于 `last_sast_check_report` 和 `current_tool_sast_check` 是字面量占位符(`${...}`),我将把它们视为空/未提供。因此,新增 = AI发现的漏洞数,减少 = 0,持平 = 0。 * 评分规则:严格遵循基于安全优先原则的计算流程。
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, BLumia 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 |
on X11, the launcher does not display on the first attempt
asynchronously and the immediate check in activeChanged handler can miss
the transition
until after the event loop processes the state change
during the delayed callback
Log: Fixed launcher not displaying on first shortcut trigger after popup
menu on X11
Influence:
launcher displays immediately
launcher activation
fix: 修复x11下弹出菜单后启动器首次不显示的问题
显示
中立即检查会错过状态转换
再评估
Log: 修复X11下弹出菜单后首次通过快捷键启动器不显示的问题
Influence:
Summary by Sourcery
Bug Fixes: