Repository navigation
Start the window where the last run left it [patch] - #525
Merged
Merged
Conversation
WindowResized saved the window's size, position and layout to the options on every move or resize, but BuildConfig never passed them back, so every launch opened at the default 1280x720. BuildConfig now starts the window from the saved state. Fixes #523 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW5JsJWSEGD7D4Jhs1d
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



WindowResizedsavesImGuiApp.WindowStatetoOptions.WindowStateevery time the window moves or resizes.BuildConfignever passed that state back, so every launch opened at the default 1280x720, in the default position and not maximized.Change
BuildConfignow setsInitialWindowState = Options.WindowState. Both constructors load or receive the options beforeMaincallsBuildConfig, so this is the state the previous run saved.ImGuiAppdoesn't expose at config time. It can follow separately if it turns out to be needed.Tests
WindowStateTests.BuildConfig_StartsTheWindowWhereTheSavedOptionsLeftIt. It checks that a saved size, position andMaximizedlayout all come throughInitialWindowState. It fails onmain(size mismatch) and passes with this change.ProjectDirector.Test: 178 pass, 1 skipped, 1 failed. The failure isCloningAnLfsRepositoryRestoresTheFileContentRatherThanThePointer, and it fails the same way onmainin this environment, so it is unrelated.Fixes #523
Generated by Claude Code