74

Till Mac OS X Snow Leopard, pressing +H while using an application did two things...

  1. The application hid itself from view.
  2. The application placed itself at the end of the + switcher.

The 2nd point was very useful, because when I hid an app, I knew I wasn't going to use it for some time. Sending it to the end of the switcher helped me focus on the apps I was using more.

However, in Lion, even though +H hides the app, it only moves it to the next position in the switcher. This is equivalent to +ing between 2 apps, except that the app is now also hidden from view. IMO, this breaks a fundamental feature of the switcher and the app-hiding concept. I have no idea why this was done.

Does anyone have clues on how, if at all, this could be fixed? Or maybe places I should start looking? I just hope there's a preference buried in some plist file somewhere...

6
  • 10
    I never noticed the position yet...;) Nice question... ;)
    – clt60
    Jul 29, 2011 at 6:41
  • 5
    This sounds like a bug in Lion to me. Perhaps let Apple know via [email protected]
    – dan8394
    Jul 30, 2011 at 20:23
  • 1
    I just entered a report/request for this at apple.com/feedback. Aug 7, 2011 at 3:38
  • I've been aggravated by this as well, and have also filed feedback. I don't know of any solutions, though, except for moving to a different cmd-tab switcher like Witch.
    – Michael H.
    Dec 15, 2011 at 19:06
  • @khedron: How does Witch fix this? It shows same order as Cmd-Tab. If I'm missing something, I'd love to know, because this mis-feature is driving me up the wall. Jan 8, 2012 at 1:06

4 Answers 4

5

This is a great question. This might be intended behavior rather than a bug. Mission Control seems to have blended both the old Expose and the old Spaces. With that in mind, launching a new app Full Screen places it on its own desktop. When you get to Mission Control you see it placed to the right of the original, empty Desktop. Open a second app Full Screen and that will place it again on its own desktop, next to the first Full Screen app you opened.

Just like the Home Screens in iOS and the old Spaces, it would seem that Apple intends these desktops to stay, space-wise, in the same place. Mail is "to the left" of Safari if I opened Safari after opening Mail. I agree that this spatial notion collides with our pre-conceived understanding of the switcher. That is same reason why hiding is disabled for Full Screen apps (pressing +H will not hide a Full Screen app).

If everything is full screen, the concept of hiding becomes less relevant. I think back to the older versions of Mac OS, where you had stacks upon stacks of windows. Hiding an app like Adobe Photoshop (and all of its many opened child windows for each one of my many opened images) made sense. If such window "stacking" is spatially not there (because those Full Screen apps are now side-by-side, they're not really stacked) then it almost makes sense that it doesn't work.

Having said all of that, I could not agree more that Lion has completely messed around with the workflow of many old-time Mac users. I do not necessarily agree with Apple's decisions here, I am just trying to play advocate and see if this one in particular has some explanation that makes sense. Hope this helps.

Update: This article at TidBITS mentions a new feature in Lion called Automatic Termination. I was not aware of this feature. I wonder if the behavior that is being experienced by this question's author is related to this.

6
  • 4
    I don't see how full screen mode relates to the behaviour of ⌘H when dealing with non-full-screen apps. Aug 7, 2011 at 2:57
  • I noticed that Cmd+H does not work for full-screen apps, so I thought he was asking referring to full-screen apps only. However, after reading the question again, it seems that he is not specifying one way or the other. If he is talking about NON full-screen apps whose Hide command does not work, I would agree that it is most likely a bug. The point of my answer above, however, was that if he was indeed talking about full-screen apps; than it could be one of those UI decisions by Apple--and I speculated that they could be seeing full-screen app switching as an analogy to the iOS app switcher. Aug 8, 2011 at 15:08
  • I updated my answer to include a link to a TidBITS article about a feature in Lion called Automatic Termination. It sounds like an app can be terminated by Lion and removed from the Command+Tab switcher. Aug 9, 2011 at 16:55
  • 3
    I don't think the Cmd+H window stack behaviour is related to automatic termination either, for at least two reasons: The application I'm hiding still has open windows that I didn't close; the app in question is not being automatically terminated by the OS, it's still running. Aug 9, 2011 at 19:47
  • @Christian\ Correa — You, sir, know your stuff. Have you considered pursuing Apple certification such as ACSP or ACTC?
    – Alex
    Jun 6, 2012 at 18:04
1

As this has been bugging me ever since this was changed I've given it another go. It seems the only working way so far is to imitate it by switching to all open apps before hiding. Not sure if applescript changed a bit but I had to change willlma's script like this for it to work. This also has substantially less key presses so should do the job faster.

delay 0.5
set i to 0
tell application "System Events"
    set first_app to name of the first process whose frontmost is true
    repeat with p in every process
        if visible of p then
            set i to i + 1
        end if
    end repeat
    repeat i - 1 times
        key down command
        key down shift
        keystroke tab
        delay 0.01
        key up shift
        key up command
        delay 0.1
    end repeat
    set visible of process first_app to false
end tell

It will show some flickering while switching and the delay can be too short if some animations take longer (like switching to full-screen apps), so the numbers are probably not optimal for all Macs or situations. And while it should be possible to set an Automator Service with a global hotkey, nothing happened for me. I've had more luck with the little application iCanHazShortcut where you can call osascript <scriptname> when pressing cmd-h.

0

Can I get back Snow-Leopard-like application hiding (Cmd-H) in Lion? … The application placed itself at the end of the + switcher. …

Since Application Switcher was introduced in Mac OS 8.5, there have been various changes.

In Lion

It's probably impossible to get the old placement with the newer Application Switcher.

If you identify the binary used for the switcher, a run of strings(1) might reveal more.

… This might be intended behaviour

I believe so.

… wasn't going to use it for some time

The behaviour in Lion is probably for a significant proportion of use cases where hiding is short term.

With a comfortable key combination (Command-Shift-Tab is less ergonomic): 

  • Lion is quicker than Snow Leopard for showing a hidden app.

Beyond Lion

In Mountain Lion, for example, there's another change: no longer an endless cycle in response to Command-Tab.

In OS X 10.9 there may be further changes.

0

This is definitely the intended behaviour. It also doesn't fade the icon, which I find annoying. I wrote a GUI applescript that imitates the old way of doing things. Copy paste this into Applescript, save it, then use fastscripts to associate it with a keyboard shortcut (like ctrl+H).

set i to 0
tell application "System Events"
    set first_app to name of the first process whose frontmost is true
    repeat with p in every process
        if p is visible then
            set i to i + 1
        end if
    end repeat
    repeat i - 1 times
        key down command
        repeat i - 1 times
            keystroke tab
            delay 0.03
        end repeat
        key up command
        delay 0.03
    end repeat
    set visible of process first_app to false
end tell
3
  • error "System Events got an error: Can’t get visible." number -1728 from visible
    – user10352
    Jan 25, 2014 at 6:49
  • Thanks for the script. I'm not actually using it and didn't test it for the exact purposes you set out (was inspecting it for another similar thing), but am just noting for anyone, I had to put " " around visible in the fifth line so it's: if p is "visible" then.
    – user46942
    May 11, 2014 at 17:00
  • As for fading the icon, that's easy to fix by installing TinkerTool.
    – Wildcard
    Sep 26, 2016 at 18:57

You must log in to answer this question.

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