Skip to content

NSWindows95InterfaceStyle menubars not working in Debian 13 #61

@dboyd-invitoep

Description

@dboyd-invitoep

Environment

  • Debian 13 (testing/trixie), GNOME 46, Wayland session (XDG_SESSION_TYPE=wayland)
  • GNUstep base 1.31.1, gui 0.32.0, back 0.32.0 (built from upstream git)
  • NSMenuInterfaceStyle = NSWindows95InterfaceStyle set in NSGlobalDomain
  • Observed with Gorm, Ink, and other apps that embed the Win95-style menu inside the main window

Symptoms
Launching any app shows no menu bar; only a thin sliver appears beneath GNOME’s rounded title bar. Console shows no errors once the Cairo null-context fix
is applied, but the menu never becomes visible.

Cause
In GNOME 46 on Wayland, Mutter now draws a 36 px client-side header bar on top of every window. GNUstep’s Win95-style menu is part of the window frame,
so it’s still positioned immediately beneath the traditional 22 px title area. The compositor’s header overlaps that region, hiding the entire menu. This
regressed between Debian 12 (GNOME 43) and Debian 13 (GNOME 46) even though GNUstep’s code didn’t change.

Proposed Fix
Teach GSWindowDecorationView to detect this configuration and reserve extra space above the menu view:

  • Detect NSWindows95InterfaceStyle, XDG_SESSION_TYPE=wayland, and XDG_CURRENT_DESKTOP/DESKTOP_SESSION containing “gnome”.
  • When those conditions hold, add a 36 px “header bar” compensation to every place we account for menu height:
    • contentRectForFrameRect: and frameRectForContentRect:
    • addMenuView, removeMenuView, layout, and toolbar placement
  • The menu view itself stays 22 px tall; we just lower it by 36 px so it sits below Mutter’s header.
  • This keeps behaviour unchanged on Xorg or other desktops.

I’ve attached a patch that adds _GSHeaderBarCompensation() in GSWindowDecorationView.m and applies the offset (requires <strings.h> for strcasecmp).

Image

gnome-wayland-menu-compensation.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions