Fix brightness HUD reverting to native macOS OSD on Tahoe#479
Fix brightness HUD reverting to native macOS OSD on Tahoe#479Kolomaster68 wants to merge 1 commit into
Conversation
The CGEvent tap for media key interception was never re-enabled after macOS disabled it due to a callback timeout. The brightness callback path triggered this by calling syncWithSystemBrightnessIfNeeded() synchronously inside the tap callback, which reads display brightness through CoreBrightness/DisplayServices — slow enough on Tahoe to hit the system timeout. Three changes: - Re-enable the tap on tapDisabledByTimeout/tapDisabledByUserInput - Remove the slow sync from adjust(by:) and add pendingAdjustTarget to fix rapid key press delta accumulation - Add missing early guard to brightness handler (matching volume) Fixes Ebullioscopic#478 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Re-enable CGEvent tap when system disables it due to timeout (Tahoe's slow CoreBrightness calls trigger the tap-disable timeout) - Guard brightness handler so disabled HUD doesn't silently fall through to native OSD - Add pendingAdjustTarget to prevent rapid key-repeat drift Cherry-picked from upstream Atoll PR Ebullioscopic#479
|
This PR is not even required as i just tested the PR and even with it its broken, here is the root cause in my setup that i had which got fixed as well, putting it here What happens: Third-party DDC integration ON → brightnessEnabled=false → interceptBrightness=false → brightness key not swallowed → passes through → native macOS OSD. By design: it hands brightness off to an external DDC app (MonitorControl/BetterDisplay) so that app drives brightness + its own OSD. To fix: Disable DDC Integration and it should work fine as normal and things should be fine. Thanks though for taking the time to investigate the issue and its greatly appreciated Cc: @Ebullioscopic |
StudioKeys
left a comment
There was a problem hiding this comment.
Not required, could be safely discarded
|
Weird, it was only working that way through my debug version. Will try your method, there's been issues with Tahoe ever since 26.5 update. |
Summary
CoreBrightness/DisplayServicescalls were slow enough on Tahoe to trigger this. The tap was never re-enabled, permanently killing all media key interception.syncWithSystemBrightnessIfNeeded()out ofadjust(by:)to prevent future timeouts. AddedpendingAdjustTargetto fix rapid key presses collapsing into a single brightness step.guard volumeEnabledpattern.Fixes #478
Test plan
🤖 Generated with Claude Code