Repository navigation
Conversation
On macOS the frameless window with a drawn title bar breaks the Window menu, the traffic-light buttons, fullscreen, and moving the window between displays. Use the native frame there and hide the drawn title bar and borders. With the native frame, save the normal (restore) rectangle from move and resize events only while the window is in its normal state. Native zoom and fullscreen move and resize the window before its state changes, so when it becomes maximized or fullscreen, take the rectangle from normalGeometry() instead. Fullscreen also counts as not normal when the settings are written at exit. The saved position is the frame position (the title bar height is taken from the native frame margins) and the saved size is the client size, matching how the window is restored with move() and resize(). When the window starts maximized, show it at the saved normal region and zoom it once the native window exists (Cocoa only restores a window it zoomed after it was shown), so un-maximizing returns it there. Other platforms are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S6AB69CNtvrecQVn1nyvL1
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.
On macOS, DSView draws its own title bar on a frameless window. That window has no Window menu entry, no working traffic-light buttons, no native fullscreen, and does not move cleanly between displays.
This change uses the native window frame on macOS only, hiding the drawn title bar and borders there. Windows and Linux are unchanged.
With the native frame, the window's restore geometry needs care:
normalGeometry(), and fullscreen counts as "not normal" when settings are written at exit.Tested on macOS 26 (Apple silicon, Qt 6.11): move/resize then relaunch; fullscreen then quit then relaunch (the saved normal rectangle survives); zoom then quit (saved as maximized with the right restore rectangle); relaunch maximized then un-zoom (returns to the saved rectangle).
🤖 Generated with Claude Code
https://claude.ai/code/session_01S6AB69CNtvrecQVn1nyvL1