Repository navigation
Conversation
Reviewer's GuideAdds the v3 foreign toplevel manager protocol as the replacement for v2, updates build and migration documentation, and redesigns dock tooltips around client-rendered wl_surfaces that become visible only after a committed buffer and explicit ready request; v2 remains available only as deprecated XML. Sequence diagram for the v3 client-drawn dock tooltipsequenceDiagram
participant Dock as Dock client
participant Compositor
participant Surface as wl_surface
participant Tooltip as treeland_tooltip_surface_v3
Dock->>Compositor: get_tooltip_surface
Compositor-->>Dock: treeland_tooltip_surface_v3
Dock->>Surface: commit buffer
Dock->>Tooltip: ready
Compositor->>Compositor: wait for committed buffer and ready
Compositor-->>Dock: show tooltip with compositor popover frame
Compositor->>Surface: use committed logical size
Dock->>Tooltip: destroy
Compositor->>Compositor: hide tooltip and release surface role
Flow diagram for v3 dock popover replacement and closingflowchart TD
A[Dock preview context] --> B{Popover action}
B -->|get_tooltip_surface| C[Tooltip surface pending]
C --> D{Committed buffer and ready?}
D -->|No| C
D -->|Yes| E[Show client content with compositor frame]
B -->|show| F[Show thumbnail preview]
F --> G[Replace and clear tooltip ready state]
B -->|close| H[Hide preview and tooltip]
H --> I[Tooltip object remains valid; ready must be sent again]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 3 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="dde/treeland-foreign-toplevel-manager-unstable-v3.xml" line_range="17" />
<code_context>
+ and must not rely on the current interface names, requests, events, or
+ semantics remaining stable across releases.
+
+ This protocol allows privileged clients such as dock or taskbar
+ components to observe and manage toplevel windows on behalf of the
+ compositor. It provides access to window metadata (title, app-id,
</code_context>
<issue_to_address>
**Untrusted clients can control windows**
When the compositor exposes the v3 global to a non-privileged client without filtering binds, a non-privileged Wayland client that can bind the manager receives mapped-window metadata and can send handle requests such as `close`, `activate`, and `set_fullscreen`, exposing private window information and allowing unauthorized window control.
Normatively require the compositor to reject binds from non-privileged clients, and enforce that restriction when exposing or binding the global.
</issue_to_address>
### Comment 2
<location path="dde/treeland-foreign-toplevel-manager-unstable-v3.xml" line_range="669" />
<code_context>
+ marked ready but has not been shown yet.
+
+ If the context that created this object has been destroyed
+ or no longer displays a tooltip, ready has no effect.
+
+ The client may send ready in the same batch as
</code_context>
<issue_to_address>
**Closed tooltips cannot reopen**
When a client closes a visible tooltip and then sends `ready` on its existing tooltip object, the `ready` request has no effect after `close` leaves the context displaying no tooltip, so a client following `close`'s instruction to send `ready` again cannot redisplay the still-valid tooltip and must destroy and recreate it.
Clarify that `ready` after `close` re-enables the retained tooltip, and limit the no-effect rule to cases where the tooltip object is no longer the context's active tooltip or its context has been destroyed.
</issue_to_address>
### Comment 3
<location path="dde/README.md" line_range="28" />
<code_context>
### 0.8.0
+#### `treeland-foreign-toplevel-manager-unstable-v2.xml`
+
+Superseded by `treeland-foreign-toplevel-manager-unstable-v3.xml`; the old v2 file moved to `deprecated/` unchanged. The protocol and its interfaces were renamed and the text tooltip was replaced by a client-drawn tooltip surface:
</code_context>
<issue_to_address>
**Protocol heading level is wrong**
The new protocol subsection uses `####` in both READMEs, but the required format uses `#####` for each protocol. The new entry therefore does not follow the prescribed breaking-change structure in either language.
Change the new protocol subsection headings to `#####` in both READMEs.
Also at `dde/README.zh_CN.md:28`.
</issue_to_address>|
|
||
| ### 0.8.0 | ||
|
|
||
| #### `treeland-foreign-toplevel-manager-unstable-v2.xml` |
There was a problem hiding this comment.
⚪ Low · Protocol heading level is wrong
The new protocol subsection uses #### in both READMEs, but the required format uses ##### for each protocol. The new entry therefore does not follow the prescribed breaking-change structure in either language.
Change the new protocol subsection headings to ##### in both READMEs.
Also at dde/README.zh_CN.md:28.
Prompt for AI agents
In `dde/README.md` at line 28:
**Protocol heading level is wrong**
The new protocol subsection uses `####` in both READMEs, but the required format uses `#####` for each protocol. The new entry therefore does not follow the prescribed breaking-change structure in either language.
Change the new protocol subsection headings to `#####` in both READMEs.
Also at `dde/README.zh_CN.md:28`.From AGENTS.md L79, AGENTS.md L90-112:
When a protocol is superseded or no longer needed, follow these steps:|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: glyvut 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 |
v3 replaces v2 and reworks the dock preview popover: - The tooltip is a client-drawn wl_surface. get_tooltip_surface returns a treeland_tooltip_surface_v3 that the client marks ready; the compositor shows the tooltip only once ready and a committed buffer have both arrived, draws its popover frame behind it, and uses the committed surface size. show_tooltip(text) is gone. - show and close cover the whole popover, and the tooltip surface never takes input, focus, or activation. Log: 新增 v3 协议,dock tooltip 改为客户端 surface 并就绪后显示 PMS: TASK-396711 Influence: dock 预览与 tooltip 走 v3,v2 废弃;tooltip 内容由客户端绘制
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 代码结构清晰,注释完整 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例本报告由 AI 代码审查工具自动生成 |
v3 replaces v2 and reworks the dock preview popover:
Log: 新增 v3 协议,dock tooltip 改为客户端 surface 并就绪后显示
PMS: TASK-396711
Influence: dock 预览与 tooltip 走 v3,v2 废弃;tooltip 内容由客户端绘制
Summary by Sourcery
Introduce the v3 foreign toplevel manager protocol with client-rendered dock tooltips and deprecate v2.
New Features:
Enhancements:
Build:
Documentation: