Skip to content

fix(menubar): Capacity Dock hover works over any frontmost app - #1197

Merged
iamtoruk merged 1 commit into
mainfrom
fix/dock-hover-any-frontmost
Aug 31, 2026
Merged

fix(menubar): Capacity Dock hover works over any frontmost app#1197
iamtoruk merged 1 commit into
mainfrom
fix/dock-hover-any-frontmost

Conversation

@iamtoruk

@iamtoruk iamtoruk commented Aug 30, 2026

Copy link
Copy Markdown
Member

Problem

After #1170, hovering the Capacity Dock icons only shows the detail bubble while Chrome (or another app that requests mouse-moved events) is frontmost. Over the Finder desktop or Terminal, hover is dead.

Root cause

#1170 synthesizes hover from NSEvent.addGlobalMonitorForEvents(matching: .mouseMoved). macOS only delivers global mouse-moved events while the frontmost application itself requests them (acceptsMouseMovedEvents). Chrome requests them constantly for web hover; Finder and Terminal do not, so the monitor never fires. Tracking areas are no alternative here because the passthrough logic flips ignoresMouseEvents, which also suppresses tracking delivery.

Fix

A 10 Hz pointer poll (Timer on the main run loop, .common mode) feeds the exact same updateMouseEventPassthrough + syncPointerHover path the monitors use. A same-position diff guard makes idle ticks free; the timer starts and stops with the existing monitor lifecycle, so a disabled dock costs nothing.

Verification

  • swift test: 341 tests in 43 suites pass.
  • Built and installed locally; awaiting manual hover check over Terminal/Finder.

…frontmost app

The #1170 hover synthesis rides on a global .mouseMoved monitor, but
macOS only delivers global mouse-moved events while the frontmost app
itself requests them. Chrome does, so hover appeared fixed there;
Finder and Terminal do not, so the dock went hover-dead over the
desktop and most native apps.

Add a 10 Hz pointer poll feeding the same passthrough + hover sync
path. A same-position diff guard makes idle ticks free, and the timer
lives and dies with the existing monitor lifecycle.
@iamtoruk
iamtoruk merged commit 7b79a4b into main Aug 31, 2026
7 checks passed
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