Skip to content

Commit c7412f4

Browse files
Mars-cbdeepin-bot[bot]
authored andcommitted
fix: 修复KLV复制模式下注销后登陆,显示外屏的壁纸
登录后默认获取的第一个屏幕作为主屏,由于复制模式下没有重新去设置,主屏未更新 Log: 修复KLV复制模式下注销后登陆,显示外屏的壁纸 Bug: https://pms.uniontech.com/bug-view-166261.html Influence: 主屏
1 parent 47960a3 commit c7412f4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

display/manager.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ type Manager struct {
217217
// 不支持调节色温的显卡型号
218218
unsupportGammaDrmList []string
219219
drmSupportGamma bool
220+
initPrimary bool
220221
}
221222

222223
type monitorSizeInfo struct {
@@ -236,6 +237,7 @@ func newManager(service *dbusutil.Service) *Manager {
236237
"Loongson",
237238
},
238239
}
240+
m.initPrimary = false
239241
m.redshiftRunner.cb = func(value int) {
240242
m.setColorTempOneShot()
241243
}
@@ -1534,7 +1536,7 @@ func (m *Manager) handlePrimaryRectChanged(pmi *MonitorInfo) {
15341536
defer m.PropsMu.Unlock()
15351537

15361538
// 复制模式不用设置主屏,由于单屏和复制模式共用一个配置,因此此处需要判断屏幕个数来确实是否是复制模式
1537-
if (m.DisplayMode == DisplayModeMirror) && (len(m.monitorMap) > 1) {
1539+
if (m.DisplayMode == DisplayModeMirror) && (len(m.monitorMap) > 1) && m.initPrimary {
15381540
return
15391541
}
15401542
m.setPropPrimary(pmi.Name)
@@ -2130,6 +2132,7 @@ func (m *Manager) applySysMonitorConfigs(mode byte, monitorsId monitorsId, monit
21302132
if err != nil {
21312133
logger.Warning(err)
21322134
}
2135+
m.initPrimary = true
21332136

21342137
return nil
21352138
}

0 commit comments

Comments
 (0)