macdems / yet-another-spotify-tray

Tray icon for Spotify Linux client application
MIT License
22 stars 6 forks source link

Right clicking and quitting doesn't quit Spotify #5

Open 103sbavert opened 1 year ago

103sbavert commented 1 year ago

Just as it sounds. Right clicking on the tray icon on KDE Plasma (using the KDE Systray) doesn't actually kill spotify, spotify-tray. Music continues to play as the process spotify is still running.

103sbavert commented 1 year ago

Upon closely examining the app's code, it seems somewhere in the code you're forking the process or making a new thread but that thread is never exiting when the main function returns.

103sbavert commented 1 year ago

Okay I did more testing and it seems the SpotifyTray app does close properly, however the spotify process gets detached from the window instead of getting killed.

macdems commented 1 year ago

I have tested this. If you just start spotify-tray and let it launch spotify everything is correct. The behavior you are describing is if we try to hijack a running Spotify window. Please do not do this. Simply start spotify-tray

103sbavert commented 1 year ago

That's not true. At least, in my case it isn't. I closed all instances of spotify, then I started spotify-tray and started playing a song. Then I right clicked on the spotify icon in the system tray and chose Quit Spotify. It did not stop playing the music although the spotify-tray process was killed.

103sbavert commented 1 year ago

Something weird I noticed is if you run the program from the terminal and then follow all the steps above and then instead of closing from the system tray, you just press Ctrl+C in Terminal, it does properly stop spotify and the music.

macdems commented 1 year ago

I am sorry, but I cannot reproduce behavior you are describing. Everything closes correctly on my computer.