fix: prevent dock tray popup flicker - #1720
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: yixinshark 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 |
Reviewer's GuidePrevents dock tray popup flicker by calculating its anchor position before the first frame, waiting for Wayland content and a rendered frame before revealing it, and resetting shared popup opacity across interrupted transitions. Sequence diagram for flicker-free dock tray popup revealsequenceDiagram
participant Tray as TrayItemSurfacePopup
participant Panel as PanelPopup
participant Wayland as WaylandSurface
participant Positioner as DockPositioner
participant Window as SharedPopupWindow
participant Frame as RenderFrame
Tray->>Panel: open()
Panel->>Wayland: hasSurfaceContent
alt content not ready
Panel-->>Panel: contentOpenPending = true
Wayland-->>Panel: contentReadyChanged
Panel->>Panel: open()
end
Tray->>Positioner: updatePosition()
Panel->>Window: finalizeOpen()
Window->>Window: opacity = 0
Window->>Window: show()
Window->>Frame: update()
Frame-->>Window: onFrameSwapped()
Window->>Window: opacity = 1
Window->>Window: requestActivate()
Flow diagram for dock tray popup positioning and revealflowchart TD
A[Tray popup opens] --> B["DockPositioner.updatePosition()"]
B --> C{Wayland content ready?}
C -- No --> D[Wait for contentReadyChanged]
D --> C
C -- Yes --> E["PanelPopup.finalizeOpen()"]
E --> F[Set shared popup opacity to 0]
F --> G[Show popup and render frame]
G --> H["onFrameSwapped()"]
H --> I[Set opacity to 1 and activate]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Calculate the tray popup position synchronously when its anchor changes so the first frame is placed at the tray item instead of the default origin. Wait for the Wayland surface to commit content, render one hidden frame, and only then reveal the shared popup window. This prevents the transparent window background from being visible before the client texture is ready. 在锚点变化时同步计算托盘弹窗位置,避免首帧使用默认原点坐标而先显示在错误位置。 等待 Wayland surface 提交内容后,以隐藏状态完成一帧渲染,再显示共享弹窗窗口,避免客户端纹理就绪前出现透明窗口背景。 Log: prevent dock tray popup flicker
6a0d68b to
4977ed7
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
📝 需求背景PR 描述摘要:
测试计划:
🔍 四维度详细分析维度1:语法逻辑(24/25分)✓ 通过评价词: 语法正确,逻辑清晰 分析: 本次变更涉及 4 个文件,语法逻辑整体正确,状态管理设计合理:
潜在问题: 维度2:代码质量(24/25分)✓ 通过评价词: 代码结构清晰,注释完整 分析:
建议:
维度3:代码性能(19/20分)✓ 通过评价词: 性能良好,资源使用合理 分析:
建议:
维度4:代码安全(30/30分)✓ 通过存在0个安全漏洞 安全漏洞详情: 安全扫描工具结果审计: 安全扫描工具(security_scanner.py)在
漏洞对比统计:新增漏洞 0 个,减少漏洞 0 个,持平 0 个 📁 文件级分析
💡 改进建议
📊 评分汇总
本报告由 AI 代码审查工具自动生成 扫描时间:2026-09-01 14:45:00 |
BUG-375267
Summary
Test plan
Summary by Sourcery
Prevent dock tray popup flicker by synchronizing popup positioning, content readiness, and visual reveal timing.
Bug Fixes:
Enhancements: