Fix: place the main menu at the origin of the screen visible frame - #899
Merged
fredkiefer merged 1 commit intoAug 9, 2026
Merged
Conversation
-[NSMenu _setGeometry] placed the main menu at x 0, and the vertical branch placed it at visibleFrame.size.height less the menu height. Both drop the frame's origin, which is not zero when a window manager reserves part of the screen and the backend reports the remainder. Measured on a 1920x1080 screen. With a dock 64 columns wide down the left edge the screen frame is 64,0 1856x1080 and the menu was mapped at X column 0, underneath the dock; it is now mapped at column 64. With a panel 40 rows deep at the bottom the frame is 0,40 1920x1040 and the menu top edge was 1040 against a frame top of 1080, leaving usable rows empty above it; it is now flush with the top. The horizontal branch already added screenFrame.origin.y, and NSMaxY keeps that result while correcting x. A work area origin in y needs the backend change in gnustep/libs-back#226; the x case is reached without it.
fredkiefer
approved these changes
Aug 9, 2026
fredkiefer
left a comment
Member
There was a problem hiding this comment.
For me it is unclear why we use the -frame in one place and the -visibleFrame in the other. But this was already that way.
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.
-[NSMenu _setGeometry] places the main menu at x 0, and the vertical branch at
visibleFrame.size.height less the menu height. Both drop the frame's origin,
which is not zero when a window manager reserves part of the screen.
Measured on a 1920x1080 screen. With a dock 64 columns wide down the left edge
the screen frame is 64,0 1856x1080 and the menu was mapped at X column 0, under
the dock; it is now at column 64. With a panel 40 rows deep at the bottom the
frame is 0,40 1920x1040 and the menu top edge was 1040 against a frame top of
1080; it is now flush.
Tests/gui gives 4489 passed 52 failed either way, so nothing moved. Those 52
fail on master here as well.
Reaching this needs a window manager publishing _NET_WORKAREA, so no test in
the suite covers it. The y case also needs gnustep/libs-back#226, which makes
the backend report a work area origin. The x case is reached without it.
Reported as gnustep/libs-back#63.