aw-watcher-window` does not track CrossOver/Wine windows on macOS
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- desktop, operating-systems
Research direction
Start by tracing the macOS watcher path using NSWorkspace.shared.frontmostApplication, focus notifications, and the AXMainWindow query, then compare it with the reported System Events and AXFocusedWindow behavior. Reproduce with a CrossOver/Wine window and inspect the watcher bucket. Done means focused Wine windows emit events with a reasonable app identifier and current title instead of retaining the previous native window.
Written by the indexing model from the issue text.
Description
Summary
When a CrossOver-hosted (Wine) application is focused — for example, a Windows game running through CrossOver — aw-watcher-window-macos does not emit a new event for it. Instead, the bucket continues to report the previously focused native macOS window for the entire duration I'm in the Wine app. Time spent in Wine apps is therefore attributed to whatever I looked at before switching to them, which is wrong.
Steps to reproduce
- Launch a Windows application through CrossOver (any bottle).
- With
aw-watcher-windowrunning, switch back and forth between a native macOS app (e.g. Safari) and the CrossOver window a few times, spending several seconds in each. - Open the ActivityWatch web UI (or query the
aw-watcher-window_<hostname>bucket directly) and look at the events for that time range.
Expected behavior
Events are emitted while the CrossOver window is focused, showing some reasonable app identifier (e.g. CrossOver, the bottle name, or the Wine process name) and the current window title.
Actual behavior
No events are emitted while the CrossOver window is focused. The bucket shows the last native macOS window as if it remained focused the whole time.
Additional context
I wrote a minimal replacement watcher in AppleScript via osascript that uses System Events:
tell application "System Events"
set frontApp to first application process whose frontmost is true
set appName to name of frontApp
tell frontApp
set windowTitle to value of attribute "AXTitle" of (value of attribute "AXFocusedWindow")
end tell
return appName & "|" & windowTitle
end tell
This does capture CrossOver/Wine windows correctly, including the window title set by the Wine-hosted app. So the Accessibility API clearly exposes the information — the current Swift implementation seems to take a code path that doesn't reach it.
Speculation about possible root causes (haven't verified against the source):
- The implementation relies on
NSWorkspace.shared.frontmostApplicationand a notification-based state that doesn't fire when focus moves to a CrossOver-hosted window. - It queries only
AXMainWindow, which CrossOver-bottled apps may not set;AXFocusedWindowmight work whereAXMainWindowdoesn't. - It filters processes by bundle identifier / bundle type and excludes CrossOver's wrapper processes.
Happy to test fixes or provide more diagnostic output if useful.
- Dominant language
- Python
- Stars
- 133
- Forks
- 92
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ActivityWatch/aw-watcher-window
-
[macos] Accessibility permission prompt reappears every ~10s even after granting accessPossibly taken @StreamOfRon claimed this 57 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
ActivityWatch/aw-watcher-window#163 · 1 comment ·
-
[macos] Swift helper never appears in the Accessibility list on its own; users must manually dig out the helper binaryPossibly taken @StreamOfRon claimed this 57 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
ActivityWatch/aw-watcher-window#103 · 1 comment · 3 reactions ·
All issues in ActivityWatch/aw-watcher-window
Similar issues
-
bug docs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
ActivityWatch/docs#223 ·
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier capturePossibly taken @jianyx1 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
volcengine/OpenViking#8354 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ARTPARK-SAHAI-ORG/calibrate-frontend#842 ·
Maintainers usually reply within 1 day
-
comp/tools P2 tool/skills type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NousResearch/hermes-agent#159541 ·
Maintainers usually reply within 1 day