Repository navigation
Show the real cursor over password prompts drawn above the hand - #45
Open
jorgenbruntveit wants to merge 1 commit into
Open
jorgenbruntveit wants to merge 1 commit into
jorgenbruntveit wants to merge 1 commit into
Conversation
macOS draws some system windows, like SecurityAgent's password prompts, in front of the overlay whatever its level, so the hand was hidden under them while the system cursor was hidden too. Windows in front of the overlay now count like open menus: over them the real cursor shows, even with Keep the hand on, and clicks reach them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
macOS draws some system windows in front of TinyHand's overlay whatever its window level. The password prompt from SecurityAgent (for example from
do shell script … with administrator privileges, or an installer asking for an admin password) reports layer 1000 but sits in front of the overlay at 1002. While the pointer is on, the hand is drawn underneath the prompt and the system cursor is hidden, so there is nothing to aim with inside it.What it does
CGWindowListCopyWindowInfolists in front of the overlay now count like open menus: over them the real cursor shows and clicks reach them.How
openMenus(overlay:)walks the front-to-back window list and also returns windows that come before the overlay's own window, below the cursor level and not owned by TinyHand. It returns those separately as well.updateZonesforces the real cursor when the mouse is over one of those windows.Testing
Built with
swift build -c releaseon macOS 27.3. With the pointer on, I opened an admin password prompt withosascript -e 'do shell script "true" with administrator privileges'. The log showed the window being detected, the real cursor each time the mouse went inside the prompt and the hand each time it left. The hand came back as soon as the prompt closed.🤖 Generated with Claude Code