Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Reviewer's GuideMigrates the Treeland output protocol consumer from v1 to unstable v2, including generated bindings, wl_output-based primary-output operations and events, picture-control acquisition, and the required TreelandProtocols 0.6 dependency while preserving the display worker’s screen-name API. Sequence diagram for v2 primary output selectionsequenceDiagram
participant DisplayWorker
participant ScreenMap
participant TreeLandOutputManager
participant Treeland
DisplayWorker->>ScreenMap: find screen by name
ScreenMap-->>DisplayWorker: wl_output*
DisplayWorker->>TreeLandOutputManager: setPrimaryOutput(wl_output*)
TreeLandOutputManager->>Treeland: set_primary_output(wl_output*)
alt primary output accepted
Treeland-->>TreeLandOutputManager: primary_output(wl_output*)
TreeLandOutputManager->>TreeLandOutputManager: qScreenFromWlOutput(wl_output*)
TreeLandOutputManager-->>DisplayWorker: primaryOutputChanged(name)
else primary output rejected
Treeland-->>TreeLandOutputManager: primary_output_failed(error)
end
Sequence diagram for v2 picture control acquisitionsequenceDiagram
participant DisplayWorker
participant TreeLandOutputManager
participant Treeland
participant PictureControl
DisplayWorker->>TreeLandOutputManager: getPictureControl(wl_output*)
TreeLandOutputManager->>TreeLandOutputManager: isOutputAlive(wl_output*)
TreeLandOutputManager->>Treeland: get_picture_control(wl_output*)
Treeland-->>TreeLandOutputManager: picture_control_v2
TreeLandOutputManager-->>DisplayWorker: ColorControl
DisplayWorker->>PictureControl: setBrightness(value)
PictureControl->>Treeland: set_brightness(value)
PictureControl->>Treeland: commit()
Treeland-->>PictureControl: result(result)
Flow diagram for wl_output and QScreen conversionflowchart LR
A[QScreen name] --> B[wlOutputFromQScreen]
B --> C[wl_output*]
C --> D[set_primary_output]
D --> E[primary_output wl_output*]
E --> F[qScreenFromWlOutput]
F --> G[primaryOutputChanged name]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Migrate the treeland output v1 protocol consumer to v2 in dde-control-center, following the same migration pattern as dde-shell. Key changes: - CMakeLists.txt: require TreelandProtocols >= 0.6, reference treeland-output-manager-unstable-v2.xml instead of v1 - TreeLandOutputManager: rebind to treeland_output_manager_v2; rename color_control → picture_control interfaces and methods (get_color_control → get_picture_control) - set_primary_output: parameter changed from string name to wl_output*; displayworker resolves monitor name → QScreen → wl_output via m_screen_outputs before calling - primary_output event: now receives wl_output* (nullable) instead of string; reverse-lookup via new WQt::Utils::qScreenFromWlOutput to recover the screen name for DisplayModel::setPrimary - result event: argument changed from uint success (1/0) to commit_result enum (success=0/failed=1/unsupported=2/...) - Add primary_output_failed event handler for v2 - Interface version reset from 2 to 1 (v2 is a new interface) - Add qScreenFromWlOutput helper to WayQtUtils for wl_output → QScreen reverse lookup Ref: DDE-233
30bbde9 to
e5133b0
Compare
|
TAG Bot New tag: 6.1.106 |
|
TAG Bot New tag: 6.1.107 |
概述
将 dde-control-center 中 treeland output v1 协议消费者迁移到 v2,参照 dde-shell 的迁移方式。
Ref: DDE-233
变更内容
src/plugin-display/CMakeLists.txtfind_package(TreelandProtocols REQUIRED)→find_package(TreelandProtocols 0.6 REQUIRED)treeland-output-manager-v1.xml→treeland-output-manager-unstable-v2.xmlsrc/plugin-display/wayland/client/TreeLandOutputManager.hqwayland-treeland-output-manager-v1.h→qwayland-treeland-output-manager-unstable-v2.htreeland_output_manager_v1→treeland_output_manager_v2treeland_output_color_control_v1→treeland_output_picture_control_v2setPrimaryOutput(const char *)→setPrimaryOutput(struct wl_output *)getColorControl→getPictureControlprimary_output事件 override 签名从(const QString &)→(struct wl_output *)primary_output_failed事件 overridesrc/plugin-display/wayland/client/TreeLandOutputManager.cpptreeland_output_*_v1::调用更名get_color_control→get_picture_controlset_primary_output参数从 string 改为wl_output *primary_output事件:从wl_output *反查 QScreen → 名称(处理 null 情况)result事件参数从success(1/0)改为result(commit_result 枚举)primary_output_failed事件处理(日志告警)src/plugin-display/wayland/client/WayQtUtils.h/.cppqScreenFromWlOutput(wl_output *)辅助函数,用于wl_output *→QScreen *反查src/plugin-display/operation/private/displayworker.cppsetPrimary:按名称查找QScreen→wl_output *后调用setPrimaryOutputupdateControl:getColorControl→getPictureControl协议 v1→v2 关键变更对照
treeland_output_manager_v1treeland_output_manager_v2treeland_output_color_control_v1treeland_output_picture_control_v2get_color_control(output)get_picture_control(output)set_primary_output(string name)set_primary_output(struct wl_output*)primary_output(string name)事件primary_output(struct wl_output*)事件(allow-null)result(uint success)事件result(uint result)事件 +commit_result枚举primary_output_failed事件(新增)约束
Summary by Sourcery
Migrate Treeland output management in the display plugin to protocol v2 while preserving primary-output and picture-control functionality.
Enhancements:
Build: