fix(output): keep copy mode when switching display parameters - #1331
Closed
Groveer wants to merge 1 commit into
Closed
fix(output): keep copy mode when switching display parameters#1331Groveer wants to merge 1 commit into
Groveer wants to merge 1 commit into
Conversation
1. In copy mode, treat wlr-output-management requests that only change display parameters (mode/refresh/scale) as non-topology changes and keep the mirror setup, instead of always converting mirror outputs to normal outputs and leaving copy mode. 2. Only tear down copy mode when an output is actually enabled/disabled; layout positions are ignored because the client may send positions remembered from a previous extension layout. 3. Only clear the persisted copy configuration when copy mode is really left, so a pure refresh-rate switch keeps the mirror topology. Log: fix mirror output being broken after switching refresh rate in copy mode Influence: 1. Enter copy mode, switch refresh rate, verify both screens stay mirrored 2. Enter copy mode, adjust positions in extension mode first, then switch refresh rate, verify mirror topology survives 3. Disable/enable an output in copy mode, verify it exits to extension mode as before fix(output): 复制模式下切换显示参数时保持复制模式 1. 复制模式下,仅改变显示参数(mode/refresh/scale)的输出管理请求不再 被当作拓扑变化处理,保持镜像输出不被拆分。 2. 仅当输出被真正启用或禁用时才退出复制模式;不再比较布局位置,因为 客户端可能发送扩展布局时记忆的位置。 3. 仅真正退出复制模式时才清除持久化的复制配置,纯刷新率切换保留镜像拓扑。 Log: 修复复制模式下切换刷新率后镜像输出被破坏的问题 Influence: 1. 进入复制模式后切换刷新率,验证两屏仍保持镜像 2. 先在扩展模式调整屏幕位置再进入复制模式,切换刷新率,验证镜像拓扑保留 3. 在复制模式下禁用/启用某输出,验证仍按原逻辑退出为扩展模式 PMS: BUG-374563
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Groveer 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 GuideUpdates output-management handling so mode, refresh-rate, scale, and stale layout-position changes do not dismantle copy mode; copy mode is now exited only for actual output enable/disable changes, with persisted copy configuration retained accordingly. Sequence diagram for preserving copy mode during output configurationsequenceDiagram
participant Client
participant Helper
participant CopyOutputs
participant CopyConfig
Client->>Helper: onOutputTestOrApply(config, onlyTest)
Helper->>Helper: inspect output enabled state
alt output enabled state changed
Helper->>CopyOutputs: convert copy proxies to normal outputs
Helper->>Helper: outputModeChanged()
Helper->>CopyConfig: clearCopyModeRestoreIntent()
else only mode, refresh, scale, or position changed
Helper->>CopyOutputs: keep mirror topology
Helper->>CopyConfig: clearCopyModeRestoreIntent()
end
Helper->>Helper: onOutputCommitFinished(config, success)
alt m_mode != OutputMode::Copy
Helper->>CopyConfig: storeCopyOutputConfig(false)
else m_mode == OutputMode::Copy
Helper->>CopyConfig: retain persisted copy configuration
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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="src/seat/helper.cpp" line_range="1082-1083" />
<code_context>
- Output *copyOutput = m_outputList.at(i);
- if (copyOutput->isSource()) {
- continue;
+ // A refresh-rate / mode switch is a display-parameter change, not a
+ // topology change. Keep copy mode unless an output is enabled/disabled.
+ bool topologyChanged = false;
+ for (const auto &state : std::as_const(states)) {
</code_context>
<issue_to_address>
**issue (broader_impact):** A copy-mode request that changes only mode/refresh/scale is classified as non-topology-changing, but its remembered `state.x`/`state.y` values are still applied later by `layout->move()`. When the client sends positions from a previous extension layout, copy outputs are moved away from their mirror layout while `m_mode` remains `Copy`, breaking the mirror topology.
**Triggers:** When a client submits a mode, refresh-rate, or scale change together with nonzero positions remembered from extension mode.
**Suggested fix:** Do not apply output-management positions while retaining copy mode; only move outputs after converting the copy proxies to normal outputs for a real enable/disable topology change.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Groveer
marked this pull request as draft
August 26, 2026 05:55
|
TAG Bot New tag: 0.9.1 |
Contributor
Author
|
use:#1380 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Log: fix mirror output being broken after switching refresh rate in copy mode
Influence:
fix(output): 复制模式下切换显示参数时保持复制模式
Log: 修复复制模式下切换刷新率后镜像输出被破坏的问题
Influence:
PMS: BUG-374563
Summary by Sourcery
Keep copy mode intact during display-parameter changes while retaining the existing transition to extension mode for output enablement changes.
Bug Fixes: