Repository navigation
feat(dock): adapt to treeland-xwindow-control-unstable-v1 protocol - #1746
deepin-bot[bot] merged 1 commit into
Conversation
Reviewer's GuideThe dock now positions XEmbed windows through the standalone treeland_xwindow_control_v1 global, preserving the existing callback handling and DDE shell overlap-checker integration while requiring and generating the protocol from TreelandProtocols 0.6.0 or newer. Sequence diagram for XEmbed positioning via xwindow controlsequenceDiagram
participant Dock as WaylandDockHelper
participant Control as TreeLandXWindowControl
participant Wayland as treeland_xwindow_control_v1
participant Callback as wl_callback
Dock->>Control: setXWindowPositionRelative(wid, anchorSurface, dx, dy)
Control->>Control: isActive()
Control->>Wayland: set_xwindow_position_relative(wid, anchor, dx, dy)
Wayland-->>Control: wl_callback
Control-->>Dock: wl_callback
Dock->>Callback: register listener
Wayland-->>Callback: asynchronous result
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
TAG Bot New tag: 2.0.55 |
|
TAG Bot New tag: 2.0.56 |
05c9b3a to
fb0d3b3
Compare
set_xwindow_position_relative has been split from treeland-dde-shell-v1 into the standalone treeland-xwindow-control-unstable-v1 protocol in treeland-protocols (>=0.6.0, commit 7ba45e4). Changes: - Add TreeLandXWindowControl class (QWaylandClientExtensionTemplate + QtWayland::treeland_xwindow_control_v1) to bind the new global interface - Move setXWindowPositionRelative from TreeLandDDEShellManager to TreeLandXWindowControl; moveXEmbedWindow now calls the new interface - TreeLandDDEShellManager is retained for get_window_overlap_checker - Add treeland-xwindow-control-unstable-v1.xml to qt_generate_wayland_protocol_client_sources in panels/dock/CMakeLists.txt - Lock find_package(TreelandProtocols) to 0.6.0 - Update debian/control Build-Depends to treeland-protocols (>= 0.6.0) - Add isInitialized() guard in ~TreeLandXWindowControl before calling destroy() to avoid crash when compositor does not support the protocol Issue: DDE-320
fb0d3b3 to
facc014
Compare
deepin pr auto reviewAI 代码审查报告
总体评价
本次提交将 dde-shell dock 模块的 XEmbed 窗口相对定位功能从已废弃的 修改文件列表
四维度评分维度1:语法逻辑(25分)✓ — 25/25
分析:
维度2:代码质量(25分)✓ — 23/25
分析:
维度3:代码性能(20分)✓ — 20/20
分析:
维度4:代码安全(30分)✓ — 30/30
分析:
改进建议建议1:补充方法文档注释文件: 问题: 建议修复: class TreeLandXWindowControl : public QWaylandClientExtensionTemplate<TreeLandXWindowControl>, public QtWayland::treeland_xwindow_control_v1
{
Q_OBJECT
public:
explicit TreeLandXWindowControl();
~TreeLandXWindowControl() override;
// Move XEmbed window to position relative to anchor surface
// Returns wl_callback* or nullptr if not active
struct ::wl_callback *setXWindowPositionRelative(uint32_t wid, struct ::wl_surface *anchor, double dx, double dy);
};OCR 审查结果
审查清单
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, deepin-wm 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 |
|
/merge |
|
This pr cannot be merged! (status: blocked) |
|
/forcemerge |
|
This pr force merged! (status: blocked) |
背景
treeland-xwindow-control-unstable-v1协议(含set_xwindow_position_relative接口)已从treeland-dde-shell-v1中独立拆分到treeland-protocols(>=0.6.0,commit7ba45e4及之后)。原treeland_dde_shell_manager_v1中的set_xwindow_position_relative已标记为 deprecated。dde-shell dock 模块需要适配,将 XEmbed 窗口相对定位调用迁移到新的
treeland_xwindow_control_v1global 接口。改动内容
panels/dock/waylanddockhelper.h#include "qwayland-treeland-xwindow-control-unstable-v1.h"TreeLandXWindowControl类,继承QWaylandClientExtensionTemplate<TreeLandXWindowControl>和QtWayland::treeland_xwindow_control_v1,提供setXWindowPositionRelative方法TreeLandDDEShellManager中移除setXWindowPositionRelative方法声明(该类保留,仍用于get_window_overlap_checker)WaylandDockHelper新增成员QScopedPointer<TreeLandXWindowControl> m_xwindowControlpanels/dock/waylanddockhelper.cppqwayland-treeland-xwindow-control-unstable-v1.h和wayland-treeland-xwindow-control-unstable-v1-client-protocol.h两个 includeTreeLandXWindowControl构造函数和setXWindowPositionRelative(检查isActive(),转调新接口)TreeLandDDEShellManager::setXWindowPositionRelative实现m_xwindowControl.reset(new TreeLandXWindowControl())moveXEmbedWindow中 isActive 检查和setXWindowPositionRelative调用从m_ddeShellManager改为m_xwindowControlm_ddeShellManager的activeChanged信号连接和 overlap checker 逻辑保持不动panels/dock/CMakeLists.txtfind_package(TreelandProtocols REQUIRED)→find_package(TreelandProtocols 0.6.0 REQUIRED)qt_generate_wayland_protocol_client_sources的 FILES 列表追加treeland-xwindow-control-unstable-v1.xmldebian/controltreeland-protocols (>> 0.5.9)→treeland-protocols (>= 0.6.0)注意事项
set_xwindow_position_relative的请求签名和回调语义与旧接口完全一致,moveXEmbedWindow中的wl_callbacklistener 逻辑无需改动TreeLandDDEShellManager类保留,仅移除setXWindowPositionRelative方法treeland-xwindow-control-unstable-v1.xml的 treeland-protocols 包(commit7ba45e4或后续发布版本)Issue: DDE-320
Summary by Sourcery
Migrate dock XEmbed positioning to the treeland_xwindow_control_v1 protocol and require the corresponding Treeland protocols release.
Enhancements:
Build: