Skip to content

Report the view's size, not the content rect, from width() and height() - #35

Merged
O6lvl4 merged 1 commit into
mainfrom
view-size
Oct 1, 2026
Merged

O6lvl4 merged 1 commit into
mainfrom
view-size

Conversation

@O6lvl4

@O6lvl4 O6lvl4 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

On macOS winit's inner_size() is contentRectForFrameRect(frame), which in full screen still subtracts the title bar that is hidden there. The surface is sized from Resized (the view's frame), so a program laying out with height() drew to a shorter height than the view, and pointer positions (measured in the view) landed below what was drawn under them.

width() / height() now return the size of the last Resized (the creation size before any), the same size the surface is configured to.

… macOS inner_size leaves out a title bar that full screen hides, so drawing and the pointer disagreed by its height
@O6lvl4
O6lvl4 merged commit cdc8cdd into main Oct 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant