From e56c730f2944ee4eae6f31fab8ffe38d1c8d8762 Mon Sep 17 00:00:00 2001 From: Niclas Overby Date: Fri, 21 Aug 2026 08:46:20 +0200 Subject: [PATCH] docs(cider): the menu bar that was hidden, and the toolbar counted by class (#163) Records what the previous commit fixed and what it left. The plan entry that said the Big Sur path costs both the menu bar and the toolbar was half wrong: the menu bar was this AppKit hiding its own view on a style mask change, and only the toolbar is an application path we do not draw. The toolbar is measured by class rather than by eye: the same three NSToolbarItemView frames at both versions, 41 NSSegmentedControl and 42 MMPopUpButton cells drawn at 1504, and not one of either at 2022. Items built, contents never drawn. Also written down that it is NOT SF Symbols, since the binary names no symbol API at all. --- docs/wayland-port.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/docs/wayland-port.md b/docs/wayland-port.md index 3d80b3f3b..a122800e6 100644 --- a/docs/wayland-port.md +++ b/docs/wayland-port.md @@ -14615,3 +14615,38 @@ the menu titles gain their two characters: AppKit does not implement it. Two characters of menu title against the menu bar is not a trade worth making, so the constant went back to 1504 with that written where it lives. The class stays: it is what makes the next attempt possible, and it is the right shape regardless. + +## The missing menu bar was our bug; the empty toolbar is the real one (2026-08-21) + +Half of the previous entry turns out to have been a defect in this AppKit rather than a feature it +does not implement, and the tree is what said so. The menu model was set identically at both versions +(`CIDER_MAINMENU set items=10 ... [MoneyMoney] [File] ... [Help]`) while `CIDER_MENU bar drawRect` +never fired at 2022, so the question was about the view, not the menu. A view dump found it: + + CIDER_VIEW NSMainMenuView 1124x28 at 0,706 mask=0xa hidden=1 + +The right size, the right place, **hidden**. `-[NSWindow setStyleMask:]` called +`_hideMenuViewIfNeeded` on every change, and that helper hides the menu view of a window that +*qualifies* for one, which is the opposite test to the one wanted here: it is written for a modal +session, where a window that would otherwise draw a menu bar must not. Nothing shows it back, so any +window that changes its style mask never draws its menu bar again. MoneyMoney adds +`NSWindowStyleMaskFullSizeContentView` on the newer path (`CIDER_MENUBAR styleMask=0xf` at 1504 +against `0x800f` at 2022), which is exactly such a change. It now hides only when the new mask no +longer qualifies and shows the bar again when it does, and at 2022 the menu bar draws with its ten +`drawRect` calls and the File menu opens on a click. + +**The toolbar is the half that is really missing**, and it is not SF Symbols: the binary has no +reference to `imageWithSystemSymbolName`, `NSImageSymbolConfiguration` or any symbol name at all. +Counted by class over a whole run: + +| drawn | 1504 | 2022 | +|--------------------------|-----:|-----:| +| `NSSegmentedControl` | 41 | 0 | +| `MMPopUpButton` | 42 | 0 | +| toolbar template images | 8 | 1 | +| `NSToolbarItemView` | 3 | 3 | + +The same three item views with the same frames, and **not one draw** of the two classes that make up +the icon strip. So the items are built and their contents never are: an application path this AppKit +does not carry, taken silently rather than by raising, which is why the exception count kept saying +zero. That is what #163 has left, and the constant stays at 1504 until it draws. -- 2.51.2