Skip to content

[window-state] Use macOS window state autosave API #20

Open
@probablykasper

Description

@probablykasper

Currently, the window state is stored in a .window-state file. macOS provides an API to automatically store the window state in defaults.
NSWindow setFrameAutosaveName

When I run defaults read com.apple.calculator I get these values:

{
    LCDStringValueKey = "0.0000000000000000";
    "NSWindow Frame Calc_History_Window" = "653 991 227 342 0 0 2560 1417 ";
    "NSWindow Frame Calc_Main_Window" = "511 294 232 321 0 0 2560 1417 ";
    ViewDefaultsKey = Basic;
    ViewPathDefaultsKey = "##BUILTIN##/BasicAndSci.calcview";
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    📬Proposal

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions