Conversation
|
Skipping CI for Draft Pull Request. |
|
[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 |
Reviewer's GuideAdds and installs an experimental compositor-side snap-target Wayland protocol that lets clients render snap previews, optionally receive owning-process pidfds, and use specially tagged overlay surfaces, with corresponding English and Chinese documentation. Sequence diagram for the snap target sessionsequenceDiagram
participant Client
participant Compositor
Client->>Compositor: start(events)
alt Snap session available
Compositor->>Compositor: Capture window layout and stacking order
Compositor-->>Client: pidfd(pidfd) when enabled and applicable
Compositor-->>Client: snap_region(x, y, width, height)
Client->>Client: Render snap preview
Client->>Compositor: stop()
else Another client is snapping
Compositor-->>Client: failed(snap_busy)
Client->>Compositor: destroy()
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
TAG Bot New tag: 0.5.10 |
37ffb3d to
6f3b8b4
Compare
|
TAG Bot New tag: 0.6.0 |
61964a5 to
e993d0d
Compare
Add a public protocol for snap region hints: while a snap session is active, the compositor tracks the cursor and reports the currently hovered rectangle. A client may opt in to the optional pidfd event for window targets via the event_type bitfield of start. Register the XML in CMakeLists and list it in both READMEs. 新增 public 协议 treeland-snap-target-unstable-v1:会话期间合成器跟踪 光标并上报当前 hover 的矩形;窗口目标的 pidfd 为可选事件,需在 start 的 event_type 位掩码中启用。在 CMakeLists 注册该 XML,并更新中英文 public README 的协议表。 Log: 新增 treeland-snap-target 吸附区域提示协议 PMS: TASK-395745 Influence: 仅新增公开协议,客户端可获取当前 hover 的矩形,并可按需启用窗口属主 pidfd;不影响既有协议与消费者行为。
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="public/treeland-snap-target-unstable-v1.xml" line_range="180-184" />
<code_context>
+ This event is sent each time the snap target changes due to cursor
+ movement.
+
+ This event commits the snap target. A pidfd event, when sent for
+ this target, precedes it and reports the process owning the target.
+ When processing this event, the client should associate the most
+ recent preceding pidfd event, if any, with this target; if no pidfd
+ event precedes it, the target has no associated process.
+
+ The region is in global logical coordinates (i.e., the
</code_context>
<issue_to_address>
**issue (bug_risk):** The instruction to associate the “most recent preceding pidfd event” lets a client associate a stale window's pidfd with a later `snap_region` for an output, empty space, destroyed window, or an unidentifiable process, because those transitions intentionally omit a pidfd event. The pidfd association must be scoped to the immediately following `snap_region` event rather than retained across region events.
**Triggers:** When a window target with an emitted pidfd is followed by a non-window or otherwise unidentifiable target.
**Suggested fix:** State that a pidfd event applies only to the immediately following `snap_region` event and that every `snap_region` without an immediately preceding pidfd has no associated process.
```suggestion
This event commits the snap target. A pidfd event, when sent for
this target, immediately precedes it and reports the process owning
the target. A pidfd event applies only to the immediately following
snap_region event. Every snap_region event without an immediately
preceding pidfd event has no associated process.
```
</issue_to_address>
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例// 暂无代码示例本报告由 AI 代码审查工具自动生成 |
Summary by Sourcery
Add the experimental compositor snap-target protocol for driving client-rendered snap previews.
New Features:
Build:
Documentation: