PKBeam / AMWin-RP

A Discord Rich Presence client for Apple Music's native Windows app.
GNU General Public License v3.0
460 stars 27 forks source link

Can't read Apple Music status when switched to another virtual desktop #73

Closed logic closed 8 months ago

logic commented 8 months ago

When the Apple Music client is open on the current virtual desktop, discord status is updated appropriately. Within a second or two of switching to another virtual desktop (ctrl-win-left/ctrl-win-right), the Apple Music discord status disappears (probably because AMWin-RP can't see details about the Apple Music app anymore).

I have no idea if there's a reasonable fix for this (I don't know what options UI Automation gives you for crossing virtual desktop boundaries), but even if it's not easily fixed, it's probably worth mentioning in the readme somehwere.

logic commented 8 months ago

Also: clicking "task view", right-clicking on Apple Music and selecting "Show windows from this app on all desktops" allows AMWin-RP to work consistently, which is how I narrowed down what was happening here. :)

(So, there's a workaround, at least.)

PKBeam commented 8 months ago

Possibly could be fixed by switching to UIA3 from FlaUI: https://github.com/FlaUI/FlaUI

PKBeam commented 8 months ago

Next update will fix this issue by directly querying process name and ID instead of iterating through desktop windows.

A beta build can be found here: https://github.com/PKBeam/AMWin-RP/releases/tag/v1.3.0b1

logic commented 7 months ago

Ah, works perfectly, thank you!