Skip to content

Window size, position and maximized state are saved on every move/resize but never restored: every launch opens at 1280x720 #523

Closed

Description

@matt-edmondson

What's wrong

WindowResized stores the window state in the options and queues a save:

private void WindowResized()
{
Options.WindowState = ImGuiApp.WindowState;
QueueSaveOptions();
}

BuildConfig never passes that state back in:

internal ImGuiAppConfig BuildConfig() => new()
{
Title = "Project Director",
OnAppMenu = ShowMenu,
OnMoveOrResize = WindowResized,
OnRender = Tick,
};

internal ImGuiAppConfig BuildConfig() => new()
{
    Title = "Project Director",
    OnAppMenu = ShowMenu,
    OnMoveOrResize = WindowResized,
    OnRender = Tick,
};

ProjectDirectorOptions.WindowState is written to disk, and nothing in the repository reads it. ktsu.ImGui.App 3.79.0 creates the window only from ImGuiAppConfig.InitialWindowState, and it keeps no store of its own. So the window always opens at the default 1280x720, in the default position, not maximized.

Why it matters

A user who maximizes the window, or moves it to a second monitor, loses that layout on every launch, even though the app saves it each time the window changes. The persisted value is dead data.

Suggested fix / acceptance criteria

  • Add InitialWindowState = Options.WindowState to BuildConfig, making sure the options are loaded before BuildConfig runs.
  • Consider clamping a saved position that is no longer on any connected monitor.
  • Add a test: BuildConfig() with loaded options whose WindowState is non-default carries that size, position and layout state through InitialWindowState.

Activity

  1. matt-edmondson commented on Nov 2, 2026

    @matt-edmondson
    ContributorAuthor

    Triage


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions