Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've been trying out Spotify for the past few days, and have been annoyed that clicking the X button in the top right of the window just minimizes it instead of closing it. In fact, even right-clicking it in the task bar and then selecting "close window" won't close it. Neither will Alt-F4.

The only two ways I know of to close it (short of killing it from the task manager) are using File → Exit or right-clicking on the tray icon and selecting Exit. Unfortunately, there don't seem to be any options to change its behavior either.

I've also noticed this behavior in other programs like Google Talk and Skype, but it makes more sense to me there since people typically want them to keep running in the background. However, I don't see why anyone would want Spotify always running even if they weren't listening to music.

Is there a way in Windows 7 to override this behavior so that clicking the X will force the program to exit? I suppose I could write an AutoHotKey script to make a keyboard shortcut that would exit it, but that seems like a hack.

share|improve this question
    
"In fact, even right-clicking it in the task bar and then selecting "close window" won't close it". If you click Quit Spotify instead then it does close, although it takes a while. It works by calling Spotify via the command line and passing in the special parameters -taskbar spotify:internal:quit. I think it would be near impossible to modify Spotify to behave the way you want as it has several tamper-prevention systems and an auto updater. Perhaps you could suggest to the developers that they add an option to control this behaviour. –  James Aug 25 '11 at 10:49
    
@James Yeah, I'm guessing there's no good way to do it other than getting the Spotify developers themselves to change the code. I did submit a complaint to them about it when I posted this question, but who knows if they'll pay any attention to it. Hopefully, there are others complaining about it as well. –  Brandon Aug 25 '11 at 19:44

6 Answers 6

You can use Alt+f, x instead of Alt+F4 as a temporary solution to quickly close Spotify.

share|improve this answer

Spotify keeps itself running in the background because it uses your computer to keep the rest of the network running (see here).

In answer to your question, the best thing I can think of that hasn't already been mentioned involves having another app or scheduled task running in the background that periodically (every minute or so) checks to see if the Spotify window is visible. If it's not visible then it can send the close command.

Windows Scheduled tasks should be capable of this, but it depends how much of a problem it is.

share|improve this answer
3  
+1 for the added insight on why they might want us to always have Spotify open. I didn't know that it uses P2P. In my opinion, that's still not a good enough reason to disable something as standard and basic as the X button though. I'd even prefer if the X button closed the GUI and left a background process running in the tray for the P2P stuff. At least then it gives the impression that it closed and gets it out of the way. –  Brandon Sep 30 '11 at 18:15
1  
Hi @Brandon. It uses P2P because that massively reduces their costs and infrastructure. If songs are popular then more people have them and Spotify themselves don't have to transfer them over the internet, it just uses other people who have listened to it. I agree that it's not a good business practice to not close the app, but I'd bet money on that being why. –  Matthew Steeples Sep 30 '11 at 18:24

I do not have that application, so this is general advice. Most browsers and many other programs also have this feature. In the vast majority of them, there is an option in settings such as a checkbox for "minimize on close" or "hide in tray", or even "accelerate startup" since the app is then already open. The verbiage varies, but they all mean the same thing.

If needed, you could create a shortcut to taskkill.exe to terminate the program. But, to be gentler with it and close it instead, you could put close.exe (in zip archive) in your System32 folder and then create a shortcut using that. The command needs the name of the window that opens when Spotify runs. It can use wildcards, too. So, if the window's name (upper left corner) is "Spotify", your shortcut could be something like this:

close.exe Spot*

That would close all windows with "Spot" as the first 4 letters of their name. Close.exe is also useful for scheduling things. It is easy to start programs with the Task Scheduler, and you can schedule their closing, too, by using the same syntax.

share|improve this answer
    
1. There's no such setting, so I doupt that a general advice would be an answer in this case. 2. How practical is it to go to the start menu/desktop to click on a shortcut when the program window that I'm trying to close is already open and in front of me? –  TFM Jul 23 '11 at 10:19
3  
You could easily put the shortcut on the Taskbar or in Quick Launch. Or "Show Desktop", or put a shortcut in the Start Menu. But using the File menu and clicking "Exit" in Spotify is only 2 clicks instead of 1 on the x. It is not very hard. You make it sound like once you open a program, you are doomed to never be able to use any other program. That is why the Taskbar exists. –  Abraxas Jul 23 '11 at 10:51

Here are some facts to take away from this:

  • Spotify detects the close button, and cancels the form close, then minimizes the application
  • It differentiates between the close button and File->Exit

It is possible to program an application that detects the close button and/or minimization of the application, and send the same message that Spotify does when File->Exit is clicked.

Not the EASIEST solution, but should work. Maybe I'll program it...

share|improve this answer

You can actually right click on the icon in the notification area and choose the open that says 'Hide from Taskbar when closed.' Then the [x] will actually close the program, not just minimize it.

Source: http://www.youtube.com/watch?v=X5reA9E7IjA

share|improve this answer
6  
+1 Because this is a good way to make Spotify not clutter up your task bar when you click the X button. However, it does not actually close the program as you claim. Rather, Spotify keeps running in the background (as the balloon that pops up in the video says). Even though it's no longer in the task bar, it still has a tray icon and still shows up under the "Processes" tab of your task manager. I'm the type of person that doesn't like having extra cruft running on my computer, so I'd like it if it would fully exit the program--not just hide it. –  Brandon Apr 19 '12 at 1:11
3  
Downvote because this just hides the program. It still runs in the background. This is my main beef with Spotify. –  Ben Jan 29 at 15:55

After endless searching and since this thread here is one of the fist things that pop up at google, I will share my solution here:

I just installed AutoHotkey and wrote the following simple script:

#IfWinActive ahk_class SpotifyMainWindow
!F4::
{
Run, taskkill /F /IM spotify.exe
return
}

If Spotify is the active Window, this will redefine the normal (not working) close-command of Alt+F4 to taskkill which will forcefully terminate spotify.

Indeed this is not very gentle, but well... seems to be the only way to close spotify without using the annoying way through the menu. And so far for me it's working without problems.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.