Skip to content

Commit 90f41f3

Browse files
committed
fix: fix display mode switching issue with three or more screens
Removed the automatic switching logic from OnlyOne mode to Mirror mode when three or more screens are connected. The previous implementation was forcing mirror mode unnecessarily, which caused issues when users wanted to maintain extended display mode with three screens. Now the system will directly apply the configured display mode without automatic switching. Influence: 1. Test connecting three screens in extended mode to ensure it maintains the correct display configuration 2. Verify that two-screen mirror mode still works correctly 3. Test switching between different display modes with multiple monitors 4. Check that single display mode functions properly 5. Validate that display configurations are applied correctly without unexpected mode changes fix: 修复三屏及以上显示模式切换问题 移除了当连接三个及以上屏幕时自动从仅显示模式切换到复制模式的逻辑。之前的 实现会不必要地强制切换到复制模式,导致用户在使用三屏扩展模式时出现问题。 现在系统将直接应用配置的显示模式而不会自动切换。 PMS: BUG-315785 Influence: 1. 测试连接三屏扩展模式,确保保持正确的显示配置 2. 验证双屏复制模式仍正常工作 3. 测试多显示器下不同显示模式之间的切换 4. 检查单显示模式功能正常 5. 验证显示配置正确应用,没有意外的模式变化
1 parent 1ad5103 commit 90f41f3

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

display1/manager.go

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,18 +1030,9 @@ func (m *Manager) applyConfig(setColorTemp bool, options applyOptions) (paths []
10301030
displayMode := m.DisplayMode
10311031
m.PropsMu.RUnlock()
10321032

1033-
// 3个及以上屏幕,如果当前显示模式是 OnlyOne,需要自动切换到 Mirror 显示模式。
1034-
if displayMode == DisplayModeOnlyOne && len(monitors) >= 3 {
1035-
logger.Debug("switchMode mirror", monitorsId)
1036-
err := m.switchModeAux(DisplayModeMirror, displayMode, monitorsId, monitorMap, setColorTemp, options)
1037-
if err != nil {
1038-
logger.Warning(err)
1039-
}
1040-
} else {
1041-
err := m.applyDisplayConfig(displayMode, monitorsId, monitorMap, setColorTemp, options)
1042-
if err != nil {
1043-
logger.Warning(err)
1044-
}
1033+
err := m.applyDisplayConfig(displayMode, monitorsId, monitorMap, setColorTemp, options)
1034+
if err != nil {
1035+
logger.Warning(err)
10451036
}
10461037

10471038
return monitors.getPaths()

0 commit comments

Comments
 (0)