aardappel / procrastitracker

a Windows time tracking application
http://strlen.com/procrastitracker/
483 stars 53 forks source link

PT recorded Chrome's activity as Explorer's #88

Closed InfinityShu closed 2 years ago

InfinityShu commented 2 years ago

image PT appeared to record the same tab under either Chrome or Explorer.
I did some tests and found out that if I had opened Chrome on my second screen, it would be recorded under Explorer. However, it was not always the case. Sometimes the Chrome tabs I had opened on my main screen were also recorded under Explorer. Could you check what might cause this problem? Thank you!

aardappel commented 2 years ago

What version of Windows are you on?

aardappel commented 2 years ago

Hmm, I bet the problem lies in this code: https://github.com/aardappel/procrastitracker/blob/e116582cf63ae2b64bd0d5be91f6fe6f8973df09/src/timercallback.h#L81-L86

That means Chrome must be spawning an Explorer child window somehow. And probably only on a dual monitor system, because I've not seen this myself.

InfinityShu commented 2 years ago

I'm currently on Windows 10, version 21H2. Are there possible solutions to this problem? I've checked the record and this problem seemed to appear since Dec 29. However, I've been using dual monitor since the first day using PT. I'm thinking that would the causation be an update of Chrome, or an update of the extensions I installed?

aardappel commented 2 years ago

Ok, I just reworked the way it obtains the executable name to be more conservative, which hopefully should solve the problem: https://github.com/aardappel/procrastitracker/commit/22ae536c81d5e89470052a5d46ebca6f213c914d

Let me know if that fixes it for you!

InfinityShu commented 2 years ago

My laptop has been running for eight hours after I installed the newest version. The problem is thoroghly fixed! Thank you so much!