Skip to content

Fix: place the main menu at the origin of the screen visible frame - #899

Merged
fredkiefer merged 1 commit into
gnustep:masterfrom
DTW-Thalion:fix/menu-visible-frame-origin
Aug 9, 2026
Merged

Fix: place the main menu at the origin of the screen visible frame#899
fredkiefer merged 1 commit into
gnustep:masterfrom
DTW-Thalion:fix/menu-visible-frame-origin

Conversation

@DTW-Thalion

Copy link
Copy Markdown
Contributor

-[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.

-[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.
@DTW-Thalion
DTW-Thalion requested a review from fredkiefer as a code owner August 6, 2026 15:34

@fredkiefer fredkiefer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@fredkiefer
fredkiefer merged commit 37de273 into gnustep:master Aug 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants