treeland-protocols: add wine wayland protocols#51
Conversation
|
Skipping CI for Draft Pull Request. |
There was a problem hiding this comment.
Pull request overview
Adds the initial Wine-specific Wayland protocol split for Treeland, separating privileged window geometry/stacking operations from window state observation/control to better model Windows APIs.
Changes:
- Introduces
treeland_wine_window_management_v1protocol XML for SetWindowPos-style geometry and Z-order control. - Introduces
treeland_wine_window_state_v1protocol XML for minimize/attention, activation requests, and pointer-grab-like behavior. - Registers both new protocol XML files for installation via CMake.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
xml/treeland-wine-window-management-v1.xml |
New protocol definition for Wine window geometry + stacking/Z-order operations. |
xml/treeland-wine-window-state-v1.xml |
New protocol definition for Wine window state control (minimize/attention/activate) and pointer grab state. |
CMakeLists.txt |
Installs the two newly added protocol XML files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add the first cut of the Wine-specific Wayland protocol split for Treeland. - add treeland_wine_window_management_v1 for SetWindowPos-style geometry and Z-order control - add treeland_wine_window_state_v1 for minimize, activation, attention, and pointer grab state - register both protocol XML files in the install list This keeps Wine window management and state control separate so each area can evolve independently while still matching the Windows API model more closely than xdg-shell.
02a7044 to
ca671c8
Compare
| summary="window_id of the sibling for hwnd_insert_after; 0 for all other ops"/> | ||
| </request> | ||
|
|
||
| <event name="window_id"> |
There was a problem hiding this comment.
是否需要一个done事件用来同步客户端这三个事件都发送了?
There was a problem hiding this comment.
初始化规定了顺序一定是 window_id -> configure_position -> configure_stacking, 收到 configure_stacking 隐含了 done 语义
| values. Flags not present in the bitfield are considered | ||
| unset. | ||
| </description> | ||
| <arg name="state" type="uint" enum="state" |
There was a problem hiding this comment.
这里只是缺什么补什么,大部分状态在 xdg-shell 协议里面
This change refactors the Treeland Wine window management and window state protocol XMLs to clarify semantics, simplify API surface, and improve alignment with Wayland and Windows concepts. The main changes include: - In treeland-wine-window-management: Removed size management from this protocol; window size is now exclusively managed via xdg_toplevel/ xdg_surface. The set_geometry request is replaced with set_position, and related swp_flags and geometry enums/events are removed or renamed. The protocol focuses solely on absolute screen position and stacking order. Updated documentation for clarity. - In treeland-wine-window-state: Streamlined pointer grab handling by removing grab_reason and related enums. Clarified that pointer grabs are now only for popup menu tracking. Updated set_attention documentation to clarify its mapping to Windows APIs and compositor/taskbar behavior. Removed the requirement for done events after certain state changes, simplifying the event sequence and clarifying client expectations. Improved documentation throughout for accuracy and clarity. 本次更改重构了 Treeland Wine 的窗口管理和窗口状态协议 XML 文件,以澄清语 义、简化 API,并更好地对齐 Wayland 和 Windows 的概念。主要变更包括: - 在 treeland-wine-window-management 协议中:移除了大小管理,窗口大小现 仅通过 xdg_toplevel/xdg_surface 管理。set_geometry 请求被 set_position 替代,相关 swp_flags 和 geometry 枚举/事件被移除或重命名。协议现在仅聚焦 于绝对屏幕位置和堆叠顺序。文档进行了更新以提升清晰度。 - 在 treeland-wine-window-state 协议中:通过移除 grab_reason 及相关枚 举,精简了指针抓取处理。明确指针抓取现仅用于弹出菜单跟踪。set_attention 文档更新,明确其与 Windows API 及合成器/任务栏行为的映射关系。移除了某些 状态变更后必须发送 done 事件的要求,简化了事件序列,明确了客户端的预期。 整体文档均有改进以提升准确性和可读性。
| been destroyed or has no configured role the compositor must | ||
| raise a defunct_toplevel error. | ||
| </description> | ||
| <arg name="id" type="new_id" interface="treeland_wine_window_control_v1"/> |
There was a problem hiding this comment.
这个客户端自己记录调用 get_window_control 时传入的哪个 toplevel
Removed all commented-out XML sections related to pointer grab requests, the grab_end_reason enum, and the pointer_grab_ended event from the protocol file. These sections were previously omitted pending a security review and are now being cleaned up to reduce clutter and improve maintainability. No functional changes are introduced, but the protocol XML is now clearer and easier to read. Influence: 1. No runtime impact—verify that protocol parsing and generation still succeed. 2. Ensure no build or tooling scripts reference the removed XML comments. 3. Confirm that documentation and developer onboarding are not affected by the removal of these commented sections. chore: 移除注释的指针抓取协议部分 从协议文件中删除了所有与指针抓取请求、grab_end_reason 枚举和 pointer_grab_ended 事件相关的注释 XML 部分。这些内容此前因安全审查暂时被 省略,现在进行清理以减少杂乱并提升可维护性。本次更改不影响功能,但使协议 XML 更加清晰易读。 影响: 1. 无运行时影响——请验证协议解析和生成仍可正常运行。 2. 确认构建或工具脚本未引用被移除的 XML 注释内容。 3. 确保文档和开发者入门流程未因这些注释部分的删除而受到影响。
deepin pr auto review这是一份为 Wine 应用程序在 Wayland 上实现窗口管理和状态控制的 Wayland 协议扩展代码。总体来说,这份代码结构清晰,文档详尽,遵循了 Wayland 协议的设计规范。以下是对语法逻辑、代码质量、代码性能和代码安全方面的详细审查和改进建议: 1. 语法逻辑优点:
改进建议:
2. 代码质量优点:
改进建议:
3. 代码性能分析:
改进建议:
4. 代码安全优点:
改进建议:
总结这份协议设计非常专业,充分考虑了 Wine 在 Wayland 上的特殊需求,并在安全性和隔离性上做了周全的考虑。主要的改进点集中在:
这些协议文件本身是高质量的,建议的改进主要是为了使其文档更加严谨,并引导合成器实现者编写更安全、更健壮的代码。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mogoweb, wineee, zccrs 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 |
Add the first cut of the Wine-specific Wayland protocol split for Treeland.
This keeps Wine window management and state control separate so each area can evolve independently while still matching the Windows API model more closely than xdg-shell.