Add presentation detection; fix break overlay input handling#3
Add presentation detection; fix break overlay input handling#3phalox wants to merge 1 commit intocheat2001:mainfrom
Conversation
Pause the break timer automatically when the user is screen sharing or watching media. PresentationDetector polls CGDisplayStream and NSWorkspace to detect active sessions; resumes when the session ends. Two new settings (pauseWhenSharing, pauseWhenWatchingMedia) are exposed in GeneralSettingsView. OSLog added to pause/resume calls for easier debugging. Overlay input fixes: override sendEvent to dismiss on first click without double-click; reclaim key-window focus after Cmd+Tab via resignKey + a NSWorkspace observer (skips reclaim while Dock/app-switcher owns the keyboard); intercept cursorUpdate to keep the arrow cursor over text. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Logs while screensharing: log stream --predicate 'subsystem == "com.eyebreak.app"' --level info --style compact |
Summary
This PR would solve #2
PresentationDetectorpollsCGDisplayStream/NSWorkspace). Resumes when the session ends. Two new settings added: Pause When Screen Sharing and Pause When Watching Media (both on by default).sendEventso the first click always dismisses without a double-click; reclaims key-window focus after Cmd+Tab viaresignKey+ aNSWorkspace.didActivateApplicationNotificationobserver (backs off while the Dock/app-switcher owns the keyboard); interceptscursorUpdateto keep the arrow cursor over text.symbolEffectguarded behind#available; empty error-handler closures removed.Test plan
🤖 Generated with Claude Code