Repository navigation
fix(titlebar): show the restore glyph on a maximized window - #1068
Merged
Merged
Conversation
On Windows the maximize button kept its single-square glyph and its "Maximize" label after the window was maximized (#1061). It now draws the restore glyph (two overlapping 8px squares, offset 2px, like the system caption button) and is labelled "Restore" while the window is maximized. The state was already right: every way of maximizing or restoring (the button, a title-bar double click, Win+Up, Aero Snap) ends in a WM_SIZE, which tao turns into the resize event the title bar listens to. Only the button never read it.
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.
Closes #1061. On Windows, a maximized window's maximize button kept the single-square glyph and the "Maximize" label.
The title bar already tracked the state: every way of maximizing or restoring (the button, a title-bar double click, Win+Up, Aero Snap) ends in a WM_SIZE, which tao reports as the resize event the title bar re-checks
isMaximizedon. The button just never read it. It now draws Windows' restore glyph (two overlapping squares) and is labelled "Restore" while maximized.common.restoreis new, in every locale, using each language's Windows system-menu wording.Tests: a vitest case in
scripts/windows.spec.tsmounts the title bar on a maximized window, expects Restore and the two-square glyph, fires a resize after restoring, and expects Maximize again. It is red without the fix.npm run check,npm run lint, both test suites,cargo test --locked, fmt and clippy pass. A macOS release build starts with its native title bar unchanged. Not tried on Windows.