Repository navigation
Count the top row of pixels as part of the menu bar - #46
Open
jorgenbruntveit wants to merge 1 commit into
Open
jorgenbruntveit wants to merge 1 commit into
jorgenbruntveit wants to merge 1 commit into
Conversation
CGRect.contains leaves out the rect's maxY edge, so with the mouse pushed against the top of the screen the menu bar check failed: the hand vanished as it entered the menu bar and came back at the very top. The menu bar rect now reaches one point past the top. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
With the mouse pushed against the top of the screen, the menu bar check fails on the very top row of pixels.
menuBarRectspansmaxY - height ..< maxY, andCGRect.containsleaves out themaxYedge, but the mouse reachesy == maxYon that row.What you see
With Show the cursor, the hand vanishes as it enters the menu bar and comes back on the top row, then vanishes again one row lower. From the log on a 1440-point-tall screen:
The same rect decides which clicks pass through to the menu bar, so a click on the top row while presenting becomes a tap instead of opening the menu. That row is the one people often throw the mouse at.
Fix
menuBarRectis one point taller, so it reaches past the top of the screen and the top row counts as inside the menu bar. Nothing else changes.Testing
Built with
swift build -c releaseon macOS 27.3 and used locally.🤖 Generated with Claude Code