Skip to content

Match macOS toolbar clicks to the tool under the pointer - #377

Merged
danjboyd merged 1 commit into
mainfrom
macos-toolbar-segment-tracking
Nov 11, 2026
Merged

danjboyd merged 1 commit into
mainfrom
macos-toolbar-segment-tracking

Conversation

@danjboyd

Copy link
Copy Markdown
Owner

Summary

On macOS, clicks near the edge of a toolbar tool could select its neighbor. The custom segmented control mapped clicks by summing widthForSegment:, which can differ from AppKit's displayed segment boundaries. The Cocoa path now lets AppKit track the click through super mouseDown:. The GNUstep handler is unchanged.

The PR also adds an offscreen hit-geometry probe. The Cocoa-only test is excluded from GNUstep compilation.

Evidence

  • Native Apple Silicon comparison using the same fixture and 27 pointer positions (left, center and right of nine toolbar segments): public 0.3.6 selected the intended tool at 22/27 positions; the local 0.4 candidate with the same production code as this PR matched 27/27. All nine centers matched in both versions. Five public-build misses were edge clicks.
  • Offscreen macOS toolbar subset: 21/21 tests passed. The focused geometry probe passed 1/1 again after its GNUstep guard was added. Local test logs are held by the macOS agent.
  • Windows GNUstep compile on the exact proposed tree: app, tools-xctest and Tests all built successfully. Windows tests were not run.

Limits and release gates

  • Dan observed a toolbar offset in public 0.3.6 on Intel macOS 12. This fix has native pointer-to-tool evidence from one Apple Silicon host; Intel/macOS 12 behavior remains untested.
  • The full macOS suite opens visible windows and was not run locally. The first PR CI run must establish the macOS runner's full-suite, app smoke and DMG build results. The local test app was a disposable SPARKLE=0 build, not a release package or updater test.
  • A restricted local sandbox caused iconutil to reject the unchanged iconset. The same iconset converted outside that sandbox to an .icns byte-identical to the parent build. Release packaging still needs CI qualification.

This is a draft PR. Its ordinary PR build CI starts automatically and uses no Sparkle secret. Merging this PR and dispatching any workflow each require separate approval from Dan. No release tag, feed or publication is requested here.

@danjboyd
danjboyd marked this pull request as ready for review November 11, 2026 17:44
@danjboyd
danjboyd merged commit a7896d5 into main Nov 11, 2026
4 checks passed
danjboyd added a commit that referenced this pull request Nov 19, 2026
docs: finish the 0.4.0 release notes (#354, #377, known issue #353)
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