How to reliably bring windows to the foreground?

I have learned a lot since I transitioned from Windows to macOS two years ago, including that cmd-tab doesn’t work the same way as Alt-Tab because it cycles through apps (not windows) and apps and windows are not as closely linked together as in Windows (in Windows, when you close the last window of an app, you close the app).

But one thing keeps bugging me and I’m not sure whether it’s because I misunderstand something and therefore do something wrong or because this is just one of those issues that are plaguing macOS and that people have just come to accept. That thing is: I have not yet found a way to reliably summon a window to the foreground on the currently active desktop/space - or at least on one of the currently visible desktops in a multi-monitor setup.

There are many ways of switching to a different window, but let’s stick to the two most basic ones: cmd + tab and clicking on the application icon in the dock. In my mind, the logical thing that can (should) happen when I cmd-tab to a running application is that this application is foregrounded on the desktop where it happens to be, and if that is not the one I’m currently looking at, then I’d also expect it to change to that space. What else would be the point of selecting the app?

A lot of times, this works, but not always.

When an application has multiple windows, I sometimes right-click the app icon and select the window I want from the menu, but even with that method, the window sometimes stubbornly stays out of sight.

There are a number of factors that I suspect play a role in some combination or another, but I can’t seem to get an overview or understand the logic:

  • the app has no window
  • the app has multiple windows
  • the app is on a different desktop/space
  • the app is on a different desktop/space on a different display
  • one or more or all of the app’s windows are minimized
  • the app is a Microsoft app
  • the app has some strange invisible window
Here is a current example Right now, I can choose among 17 apps when I press cmd + tab:

To some of them, I can switch as expected, but no window appears when I select any of the following (the respective app’s menu bar appears, though):

  • DeepL
  • Microsoft Edge
  • Adobe Acrobat
  • Sublime
  • Miro

In the case of DeepL, Acrobat, and Miro, that may be because they may not have any window (though I’m not sure how I’m supposed to know that as a user). In the case of Sublime and Edge, however, I see in the dock that each of these have a (minimized) window:

CleanShot-2023-06-17 at 20.19.48@2x

So, I assume that the reason for these windows not coming to the foreground is that they are minimized.

While there may be some benefits of ignoring minimized windows as long as the same app has non-minimized windows, I don’t see the point of macOS stubbornly ignoring minimized windows when I’m obviously trying to switch to that application and there are no other windows.

But okay. So, in order to switch to that minimized Sublime window using my keyboard, I am supposed to cmd + tab, then cursor-up, which gives me this:

(Note how macOS still says “What? Sublime? I have no idea what you’re talking about”, i.e. "no available windows).

I then have to do cursor-down (which you’d think reverses the previous cursor-up action, but it doesn’t) to select the sublime window that macOS does not want to see.

If I now release all keys, you might think that this will foreground the selected window, but now. Nothing happens. In order to finally maximize and foreground the window, I need to press Enter. :roll_eyes:

Is this really the only/ best way? I must be missing something…

Is there any app that fixes this UX nightmare? Or at least a way of highlighting apps with windows in the cmd + tab menu, so that I at least know what to expect when I select any of the others?

Witch

I found one app that seems to help with that, Witch. I think one of the tricks it uses is the settings:

But even that fails in some situations. (Can’t seem to produce such a situation at the moment.) And the app has so many settings that I have so far failed to wrap my head around it. Perhaps also because something in me kept insisting: this must be possible without a complicated third-party app. I also find it noticeably slower than the native cmd-tab command.

Finally, let me mention that also Alfred sometimes does the trick. In the above scenario, both opening Subline and opening Edge via Alfred will foreground the minimized windows.

Alt-Tab

I just found another app that seems to address some of these issues: Alt-Tab. I will try it once I’ve submitted this post.

Let me just close by saying: even though I have started to list apps that might solve some of these issues, I also welcome any assistance with understanding the logic of how all this is supposed to work in macOS.

If I am understanding you correctly, try Command-Tab to the desired app
and then WHILE holding Command, (let go of Tab) press the Option key

1 Like

This may not solve your particular problem, but here is a handy keystroke to know: Cmd-` (that’s the backtick, immediately to the left of the number 1 key on a U.S. keyboard, under the ~ tilde).

Cmd-backtick cycles through windows in an app.

(Similarly, Controll-Tab cycles through tabs, eg in a browser window.)

However, I’m pretty cmd-backtick doesn’t include minimized windows. In MacOS, minimization is pretty much absolute – the window goes down to the dock and stays there until you explicitly retrieve it.

I find minimization largely useless as a result and simply don’t use it except in very unusual circumstances.

Another macOS idiom you might want to learn: Cmd-h for “hide”. It, well, hides all windows of an app. No need to minimize. They’re still there, still in the cmd-Tab queue, but you don’t see them.

You can hide all but one app if you like, either by using cmd-h sequentially or my pressing cmd-shift-h to hide all but the current app (I think; it might be cmd-option-h – I’m on mobile and it’s all muscle memory for me by now).

3 Likes

@toffy, my best advice to a Windows user trying to Grok windows on the Mac is to never minimize a window. Always use CMD+H to hide a window and I think you’ll have a better time of it. (If you or someone else mentioned this above, I’m sorry I missed it. :slightly_smiling_face:)

EDIT TO ADD I did miss it. I just want to emphasize @tf2 's advice!

5 Likes

Thanks! This is kinda funny finger acrobatics. :sweat_smile: From what I can see, this does about the same as using the cursor keys (while keeping the cmd key pressed). The difference is that I don’t have to confirm the selected window with the Enter key. The downside, however, is that it doesn’t reveal multiple minimized windows of the selected app, only one of them and without even hinting at there being more.

Apart from that, my gripe with both of these “solutions” is that I need to know that there are minimized windows for that app before I select it (because I need to use either the cursor keys or the option key before I release the cmd key. To me this is not a viable solution.

For anyone on an ISO keyboard, it is also worth noting that the shortcut may not be cmd + ´ but cmd + whatever key is right below the escape key. Took me a while to realize that.

This is good to know when you explicitly want to cycle through the windows of a specific app, like when you’ve got multiple documents open in Preview or Word. But even then it can be misleading because it only cycles through the windows on the current desktop. Windows on other desktops are ignored. And, as you already noted, it does not catch minimized windows either.

This strikes me as an important insight. I have previously never dared to hide apps, because, to me it sounded like it would make them even more difficult to access when needed, but you are right: while minimized apps cling to the dock, hidden apps leave their hiding place when summoned via cmd + tab. I will use cmd + h and see what difference it makes in practice.

Meanwhile, I have done some more research (some useful pages related to this topic are here and here) and I tend to conclude that windows management is simply a weakness in macOS (both in terms of what is possible to do and how easy/intuitive that is).

So I am now trying Alt-Tab, Witch, and perhaps Command Tab Plus. Tha latter is quite expensive, but I might take a look at it because both Alt-Tab and Witch seem to have some (minor) shortcomings:

  • Alt-Tab’s colour design makes it difficult/impossible to see which window is currently selected when the background is dark.

  • Witch: is a bit slow (we are talking about milli-seconds, but when you quickly want to switch - which is the whole point of cmd-tab - those count.

But also Command Tab Plus has its glitches. After relaunching it, the app icons are no longer displayed properly.

Third try it works again:

I appreciate your perspective. As someone who has used Macs for decades, I find windows management on Windows to be baffling in think like so much in the Mac vs. Windows debate, a lot comes down to what you’re used to.

That said, the Mac is incredibly customizable, both through dedicated window-management apps like the ones you mentioned, and through more general automation tools like Keyboard Maestro, Moom, Better Touch Tool, Hammerspoon, Alfred and many, many more.

FWIW; A couple of OS versions ago (like 5 years or so) when switching to an app with only minimized windows, one of the windows would lose it’s minimized status and get visible. Extremely annoying, and Apple changed this, which I think is a good choice – After all I as the user minimized the window for a reason, right?

Another thing that I know disturbs many people is that if you click the red button on all open windows, the app will still not quit. You have to actually quit it. For me that have use Macs since '87 this is expected behavior. I understand if others don’t feel he same way.

One strange thing though is that if you close all open windows in main windows centric apps such as Mail or Music, open another app and then go back to the app, the main window is still closed. I understand what’s happening, but many of my not-so-computer-savvy clients don’t understand. And I actually think that if the app have some sort of “Main Window” (like Mail or Music have), the main window should act as a pallette, or at least open again when you have closed it. But then again, this goes against the user having control of the computer.

Hint:
You can always see the currently open app in the top left corner (nex to the Apple menu), and most (maybe all?) apps have a Windows menu where you can locate hidden and minimized windows.

/$0.02

PS. Always use Hide, it’s better than anything else! DS.