fix(output): restore configured topology after output reconnect#1176
fix(output): restore configured topology after output reconnect#1176zzxyb wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zzxyb 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 |
There was a problem hiding this comment.
Pull request overview
中文概述:
此 PR 旨在将输出拓扑(单屏 / 扩展 / 复制)相关状态持久化到全局 DConfig,并在初次扫描与输出重连(hotplug/reconnect)时基于稳定的 output ID 恢复配置;同时用新的 OutputManager 替代此前的临时状态与生命周期辅助类,以统一主屏意图、surface 迁移、复制输出重建与单屏回退逻辑。
English summary:
This PR persists single-output and copy-mode state into global DConfig and restores the configured output topology after the initial output scan and on output reconnects. It introduces OutputManager to replace transient output state/lifecycle helpers so primary-output intent, surface migration, copy-output recreation, and single-output fallback are driven by stable output IDs.
Changes:
- Introduce
src/output/outputmanager.{h,cpp}and migrate Helper’s output lifecycle logic fromOutputConfigState/OutputLifecycleManagertoOutputManager. - Rework initial scan + reconnect handling in
Helperto restore extension/single/copy topology from global config and to re-register outputs consistently in root container/layout. - Extend virtual-output manager API and adjust output enabling / viewport detach ordering.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
waylib/src/server/qtquick/woutputviewport.cpp |
Adjusts detach ordering to avoid synchronous layer-change callbacks re-querying an already-detached viewport. |
src/seat/helper.h |
Replaces old output helpers with OutputManager and adds new helper methods/state for topology restore. |
src/seat/helper.cpp |
Major refactor: initial scan gating, restore logic, root/layout re-registration, copy/single persistence, and surface migration updates. |
src/output/outputmanager.h |
Defines new OutputManager API for mode management, restore intents, and config persistence. |
src/output/outputmanager.cpp |
Implements ID-based persistence/restore for single-output + copy-mode, plus primary-output intent tracking. |
src/output/outputlifecyclemanager.h |
Removed (replaced by OutputManager). |
src/output/outputlifecyclemanager.cpp |
Removed (replaced by OutputManager). |
src/output/outputconfigstate.h |
Removed (no longer needed after moving persistence to global DConfig + OutputManager). |
src/output/outputconfigstate.cpp |
Removed (no longer needed after moving persistence to global DConfig + OutputManager). |
src/output/output.cpp |
Improves Output::enable() to reconcile cached _Enabled with wlroots enabled state and adds categorized logging. |
src/modules/virtual-output/virtualoutputmanagerinterfacev1.h |
Adds APIs to restore/update/remove virtual output groups and exposes VirtualOutputInterfaceV1::name(). |
src/modules/virtual-output/virtualoutputmanagerinterfacev1.cpp |
Refactors persistent config handling and adds restore/update/remove support for virtual output groups. |
src/CMakeLists.txt |
Replaces removed output helper sources with new outputmanager sources. |
misc/dconfig/org.deepin.dde.treeland.output.json |
Removes per-output enabled key (shifts enable/disable semantics to global single-output/copy configuration). |
misc/dconfig/org.deepin.dde.treeland.json |
Adds global keys: singleOutputId, createCopyOutput, copyOutputName, copyOutputOutputs. |
Persist single-output and copy-mode state in global DConfig and restore the configured output topology after the initial output scan and subsequent reconnects. Replace the transient output config state and lifecycle helpers with OutputManager so primary-output intent, surface migration, copy-output recreation, and single-output fallback all use stable output IDs. Re-register outputs consistently in the root container and output layout before applying configuration, and update virtual-output state when copy-mode groups are restored, changed, or removed. Log: restore display mode after output reconnect PMS: BUG-300647 Influence: Output mode restoration after display reconnect, hotplug, and restart
Persist single-output and copy-mode state in global DConfig and restore the configured output topology after the initial output scan and subsequent reconnects. Replace the transient output config state and lifecycle helpers with OutputManager so primary-output intent, surface migration, copy-output recreation, and single-output fallback all use stable output IDs.
Re-register outputs consistently in the root container and output layout before applying configuration, and update virtual-output state when copy-mode groups are restored, changed, or removed.
Log: restore display mode after output reconnect
PMS: BUG-300647
Influence: Output mode restoration after display reconnect, hotplug, and restart