5

When I'm working on MS Office 2011, when I close a document, spreadsheet, presentation, etc., the application stays open. This is confusing (to me anyway) and I find myself having to explicitly quit these apps all the time (to get them out of the way).

Is there a way to quit an app when the last item is closed?

Thanks in advance!

3 Answers 3

5

It's an implementation detail that the developer has to implement. In your example case, for Office, it's Microsoft.

Here is the Cocoa Objective-C code that allows the developer to implement this feature:

- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender
{
   return YES;
}

What you're observing is normal behavior on almost all applications on OS X and even the classic Mac OS. It's one of those things you should get used to on the Mac. However, these days, you are in luck that things are changing in your favor in Lion and probably later as OS X gains more features from iOS. As referenced in Lion Is a Quitter.

Lion will quit your running applications behind your back if it decides it needs the resources, and if you don’t appear to be using them. The heuristic for determining whether an application is “in use” is very conservative: it must not be the active application, it must have no visible, non-minimized windows — and, of course, it must explicitly support Automatic Termination.

Clearly, it looks like that version of Microsoft Office does not support Automatic Termination yet, but it may be coming.

So for now, the most you can do is check the program's preferences for options relating to quitting the application when it has no more windows open. Also, I encourage you to give Microsoft and / or any developer of apps feedback that you would like to see "quitting on last window closed" as a preference option or suggest they add support for Automatic Termination to their products.

Until then, just remember to use +Q when you are done with those applications that do not automatically quit when you close all its windows.

1
  • Thanks for the extra detail. Basically was using command+q key combo.
    – Rich
    Mar 7, 2012 at 15:09
1

I don't think that's a way for that. You can use Command + Q to quit the program, or click on the name of the app on the Menubar and select Quit.

1

When I started using a Mac, I found that too. Some applications quit after the last window is closed and some (most, in my experience) don't.

Doesn't really answer your question, but I just got used to using + Q which will quit the application. That way if you have any open, unsaved documents it will prompt you to save them, then quit.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .