返回 DeepSeek-Reasonix
window_geometry.go
根目录 / desktop / window_geometry.go
1 package main
2
3 import goruntime "runtime"
4
5 // restoreWindowGeometry applies the saved maximise state before presentation.
6 // The shell already restored and fitted the full rectangle during creation;
7 // never overwrite its display-aware position with a second Go-side restore.
8 func (a *App) restoreWindowGeometry() {
9 host := a.nativeHost()
10 state, ok := loadWindowState()
11
12 if ok && state.Maximised {
13 if goruntime.GOOS == "windows" {
14 // Preserve the established Windows maximise -> show ordering through
15 // the unified presentation plan without appending SW_RESTORE.
16 a.backgroundMaximised.Store(true)
17 } else {
18 host.MaximiseWindow(a.ctx)
19 }
20 }
21 }
22
22 lines GO