Repository navigation
Reopen the window maximized when it was left maximized (#553) - #555
Merged
Merged
Conversation
The window always opened at its default size. The session now records whether it was maximized, saved when it is maximized or restored, and opens it that way again. A minimized window keeps what it was: Windows reports it as not maximized. Not on macOS, where egui reads the state only at launch (emilk/egui#3494). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
X11 window managers ignore a maximize request for a window that is not mapped yet, and eframe keeps the window hidden until the first frame is painted, so the window reopened unmaximized and that was saved. The first frame asks again, after eframe shows the window, and the state is not saved until the window is maximized or two seconds pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A window started minimized (a shortcut set to Run: Minimized) would have been restored by the request; one already maximized needs none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task done
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.
Fixes #553.
The window always opened at its default 1440×960 size; nothing about it was persisted.
session.jsonnow records whether the window was maximized, and the next launch opens it maximized.SIZE_MINIMIZED.after_first_show). The state isn't saved until the window reports maximized or 2 s pass, so those first frames don't overwrite it. A window that is already maximized (Windows, Wayland) or started minimized isn't asked again.Known limitation
On Windows a window restored maximized can flash briefly while unpainted at startup: winit maximizes the hidden window with
ShowWindow(SW_MAXIMIZE), then hides it again. The upstream fix (emilk/egui#8687, cloaking the window via DWM) lives in egui-winit, and app code only gets the window after the flash has happened. It goes away when we move the crmne/egui pin to a revision that includes #8687.Review
Codex (GPT-6.1-Sol) round 1 found the X11 problem (fixed) and the Windows flash (declined above). Round 2 was interrupted before it gave a verdict; its partial notes cleared Wayland and the deadline timing. The minimized-launch guard was added after it.
Not tested on Windows: no machine available.
Checks
the_window_reopens_maximized_as_it_was_leftanda_window_reopened_maximized_keeps_that_until_the_window_manager_maximizes_it; each fails without the behaviour it covers.cargo fmt --checkandcargo clippy --workspace --all-targets --locked -- -D warningspass.cargo test --workspace --locked --no-fail-fast: all pass exceptrawmakase-decodechart_dng_fingerprint_is_pinned, which fails locally because this machine has lens profiles installed; unrelated.🤖 Generated with Claude Code