Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macos] loginwindow reported with latest macOS update #85

Open
iloveitaly opened this issue Jan 2, 2023 · 5 comments
Open

[macos] loginwindow reported with latest macOS update #85

iloveitaly opened this issue Jan 2, 2023 · 5 comments

Comments

@iloveitaly
Copy link
Contributor

I'm running into an issue where login window is reporting > 1hr of usage over a week period. I think this issue is connected to AFK and how it works.

image

  1. Does Exclude AFK time filter out time where there is no AFK data? i.e. will the login window time above be excluded?
  2. If not, do you think we should just explicitly filter out loginwindow events (string matching on the title)? Or should we improve AFK to 'fill in' the missing time period when the computer was sleeping (similar to what the macOS window watcher implementation does).
@iloveitaly
Copy link
Contributor Author

@ErikBjare friendly ping here—wdyt is the best approach?

@ErikBjare
Copy link
Member

Exclude AFK time only selects time where there is a 'not-afk' event. If data is missing or 'afk', it won't/shouldn't pass the filter.

This could possibly be some other bug with overlapping events, not sure why/how this happens.

@ErikBjare
Copy link
Member

One possibility is that on unlock, the user might keep using whatever app is active (no app/title switch to trigger a new event), and the watcher continues to think loginwindow is active.

I've had a similar issue where, for some applications, the window-switch doesn't seem to fire an event. Like when I start games from Steam, it will sometimes keep tracking Steam until I tab-switch back and forth. Adding polling to augment the event-listener would fix this. Someone else has reported the same in issues or on the Discord.

@iloveitaly
Copy link
Contributor Author

Adding polling to augment the event-listener would fix this.

Ah, interesting. I think this is a good approach—do a poll every 10s or so if we haven't received a OS notification. Does that sound good to you?

@iloveitaly
Copy link
Contributor Author

@ErikBjare I've just hardcoded excluding loginwindow events for now and it's working pretty well. I think adding a poll to the swift implementation will be better, but I'm wondering if you are open to a hardcoded exclusion in the meantime (I don't have time for the polling stuff right now).

iloveitaly added a commit to iloveitaly/aw-watcher-window that referenced this issue Mar 7, 2023
iloveitaly added a commit to iloveitaly/aw-watcher-window that referenced this issue Jun 16, 2023
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

No branches or pull requests

2 participants