Persist window position per VM using ECID as frame autosave name

This commit is contained in:
Lakr
2026-03-08 02:11:25 +08:00
parent ef02d50244
commit b7448b7dc8

View File

@@ -40,7 +40,13 @@ class VPhoneWindowController: NSObject, NSToolbarDelegate {
window.title = "VPHONE ⏳"
window.subtitle = ecid ?? ""
window.contentView = vmView
window.center()
if let ecid {
if !window.setFrameAutosaveName("vphone-\(ecid)") {
window.center()
}
} else {
window.center()
}
// Toolbar with unified style for two-line title
let toolbar = NSToolbar(identifier: "vphone-toolbar")