Skip to content

fix(mac): no tiny cursor on hover changes (0.5.2) - #555

Merged
Maxaubert merged 3 commits into
mainfrom
fix/554-mac-hover-cursor-glimpse
Nov 6, 2026
Merged

Maxaubert merged 3 commits into
mainfrom
fix/554-mac-hover-cursor-glimpse

Conversation

@Maxaubert

@Maxaubert Maxaubert commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

What

Fixes #554. On Render and Backdrop, an app's cursor change on hover (arrow to pointing hand) showed the real, unmagnified cursor for a frame or two on many hovers.

Wind's check read the app's cursor image before clearing it. That read is a WindowServer round trip and took longer than the wait between checks, so faster checks alone changed nothing. Two changes:

  • The check hides the real cursor first, then reads, clears and shows it again, and runs every 0.25 ms. Wind's CPU at 3x went from 3.8% to 3.9%.
  • That still left about 1 flash in 20 changes in the owner's browser. So the real cursor is now hidden while the pointer moves (apps change cursors on moves) and transparent only once it rests for 0.06 s, with a hover recheck. It's event driven from the event tap, with no polling. SwiftUI hover, such as a banner's close button, now comes about 0.06 s after the pointer stops (60 and 40 ms both showed 0 flashes in glimpse_truth.py --pauses, hand-like stops); AppKit and web hover are unchanged.

Measured on screen

glimpse_truth.py captures every frame with the cursor, about 35 hover changes per run, and counts frames showing the real cursor:

Frames per run
Before 3-12, about 7
Hide first only 1-5
Hide first, 0.25 ms 0-2
This PR (hidden while moving) 0 in 4 runs, both engines

Tests

glimpse_truth 4/4 (twice), backdrop_truth 18/18, churn_truth all pass (also over ChatGPT), e2e_hover 43/43, e2e_draw 75/75, e2e_screenshot 62/62, e2e 18/18, e2e_settings_mouse 11/11, hitch_truth pass, wind-checks pass. e2e_mouse: the edge game-lock check fails on main and here alike (main 1 and 3 failures over two runs, this PR 0 and 1).

Test fixes: e2e_settings_mouse no longer expects the transparent cursor shown while moving, churn_truth's stop check assumed a fixed pointer travel (the owner's mouse settings changed), and backdrop_truth now waits for the recording dot of a previous suite to clear.

Not tested: the owner's real case, a file label in Internxt in the ChatGPT browser, with the final build.

Version 0.5.2. Mac release is unsigned (ad hoc).

🤖 Generated with Claude Code

https://claude.ai/code/session_01SkyGaTJWN7aoebcu1GASvL

Maxaubert and others added 3 commits November 6, 2026 09:41
An app's single cursor change (a hover effect) showed the real cursor on screen in
about 1 of 5 changes: Wind's look read the app's cursor image before clearing it,
and that read took longer than the wait between looks. The look now hides the real
cursor first, reads, clears, shows again, and looks every 0.25 ms (CPU unchanged).
glimpse_truth.py counts real-cursor frames on screen: about 7 per 35 changes before,
0-2 now. churn_truth's stop check no longer assumes a pointer travel.

Fixes #554

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SkyGaTJWN7aoebcu1GASvL
…rest

Even with the hide first and a look every 0.25 ms, about 1 in 20 hover changes
still flashed (0.2 ms exposure against a 6.9 ms refresh; 5 seen in a minute in the
owner's browser). Apps set the cursor on mouse moves, so the real cursor is now
hidden while moving and transparent again 0.15 s after it stops, with a hover
recheck. Event driven from the tap, no polling. SwiftUI hover comes about 0.1 s
after stopping. glimpse_truth: 0 frames in 4 runs. e2e_settings_mouse no longer
expects the transparent cursor shown while moving.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SkyGaTJWN7aoebcu1GASvL
glimpse_truth --pauses (hand-like 20-200 ms stops) showed 0 real-cursor frames at 150, 60 and 40 ms
on both engines; 60 keeps a margin for slow trackpad moves. WIND_REST_MS test override.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SkyGaTJWN7aoebcu1GASvL
@Maxaubert
Maxaubert merged commit ecaf755 into main Nov 6, 2026
1 check passed
@Maxaubert
Maxaubert deleted the fix/554-mac-hover-cursor-glimpse branch November 6, 2026 19:05
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.

Mac: tiny cursor for a frame or two on hover changes

1 participant