Why can’t I close windows directly from the Alt+Tab interface in Windows Vista?

On an internal mailing list, somebody asked why the thumbnail-based Alt+Tab interface in Windows Vista doesn't show a little ✖︎ so you can close the window directly from the Alt+Tab list:

I tend to end up with a gazillion email messages all over my screen, so I need to do garbage collection from time to time. Maybe it's my own fault for letting them pile up in the first place. The taskbar does such a good job of hiding the clutter that the moment I realize that I have too many windows open is usually when I hit Alt+Tab. I find that while I'm searching for the window I want, I wander through a lot of random windows I want to close. I don't want to have to leave Alt+Tab to close those windows, since I'd have to return to Alt+Tab and start my search over. Why isn't there a red × in the corner of each thumbnail so I can close them without having to break my concentration?

One of the developers replied with this answer:

When we originally added the new Alt+Tab to Windows Vista, we also included the ability to close, minimize, and maximize windows without leaving Alt+Tab. We had to abandon the feature, however, in large part because the new Alt+Tab runs inside Explorer (which is not normally elevated), and bad things were happening when we tried to manipulate elevated windows. There were other problems, too, such as trying to close a window that displays a "Do you want to save?" dialog.

Fortunately, these problems got worked through and resolved in later versions of Windows, so you can now close directly from the Alt+Tab. But this explains why it took a while.

If you're still running Windows Vista (and really, huh?), and you want to close a large number of windows and closing entire taskbar groups doesn't give you the granularity you need, you can hover over the taskbar button and click the the ✖︎ for each thumbnail you want to close.

You can also hit Ctrl+Shift+Esc to launch the Windows Vista Task Manager, go to the Applications page, multi-select all the windows you want to close, and click End Task. If you do it from the Applications page, then Task Manager will do the friendly thing and post a WM_CLOSE message to the window.

Don't try this on Windows 8 or later, though. Ending a task from the Applications page will terminate it immediately!

Pre-emptive snarky comment: "The idiots in charge of the Windows 8 Task Manager didn't include this feature in their redesign."

Comments (24)

  1. skSdnW says:

    “new Alt+Tab runs inside Explorer” This has bitten me many times while debugging shell extensions, muscle memory is just too strong and logging out is often the only option. Thankfully most extension types can be debugged in other processes with a shell view. You can also disable the new Alt+Tab with a registry setting.

  2. Entegy says:

    Huh. Didn’t even realize you could close windows from alt+tab. If I’m using alt+tab, I’m exclusively using the keyboard. I knew you could mouse over windows while holding alt, but haven’t done it enough to notice the X to close them too.

    1. Gee Law says:

      I think people who do try clicking the “X” button will use Windows+Alt+Tab, which gives you a sticky version of the task switcher.

      1. Was unaware of the extra windows key modifier possibility here. Thanks!

    2. e3bd87eb6d says:

      In Windows 10 you can use the Del key while in the task switcher to close windows.
      Also you can middle-click thumbnails to do that, which (I think) has been there since Windows 7.

  3. RKPatrick says:

    Now see if you can find out why the “X”s on WinPhone’s “alt-tab” screen are so tiny. It’s a nice addition, but too often, I wind up activating a window rather than closing it.

    1. Entegy says:

      You can just swipe downwards on them. No need for the X.

      1. Wearwolf2500 says:

        Huh, I didn’t know you could do that. Awesome.

  4. koro666 says:

    So, the Alt-Tab, which runs in Explorer, can’t manipulate elevated windows, but the taskbar, which also runs in Explorer, can?

    Additionally, I kind of dislike this new direction of having Explorer be the one implementing everything: Alt-Tab, desktop wallpaper rendering, immersive apps host… these things should have their own process (or be implemented within CSRSS), not be tied to a particular shell.

    1. Darran Rowe says:

      Well, originally task manager could be elevated, but explorer always automatically relaunched itself using a limited process token if it detected that it was run with an elevated token with UAC enabled.
      There was something that wasn’t in the original UAC that was added to UAC in Windows 7 which really helped, that was Windows white listing certain Microsoft applications so they would elevate without prompting. This could allow explorer to use this to close an elevated application.

    2. Darran Rowe says:

      Also, task manager is a separate application. It runs as taskmgr.exe. This means that it has a separate security context from explorer and so it is able to run elevated where explorer itself can’t.

      1. yadt84 says:

        The task *bar* not taskmgr.

        1. Darran Rowe says:

          Misread that.
          But I wouldn’t be surprised if that was to do with peek.
          But I don’t currently have Vista to test out what happens in the task bar if you disable aero.

    3. Gee Law says:

      Alt+Tab can close elevated windows. That part is wrong.

      1. Darran Rowe says:

        Umm, he didn’t say that alt+tab can’t close elevated windows, he was stating how in Windows Vista, they couldn’t get alt+tab to close elevated windows, but the cross in the task bar could.
        I’m sure he fully understand how in Windows 7 and later, you can close an elevated window from alt+tab, but I guess context is hard to get at times.

        1. Gee Law says:

          Is your “he” koro6666? I think koro6666’s statement indicates his disbelief in what Raymond says in the article. And by “that part was wrong”, I meant the part the developer justified why Alt+Tab window closing was abandoned in Windows Vista was wrong, and the argument is koro6666’s comparison between in-explorer Alt+Tab v.s. in-explorer Taskbar.

    4. Gee Law says:

      The other thing. In Windows 10, the “real shell” is sihost. If you terminate sihost, explorer and immersive apps will terminate and restart with sihost. Proof: terminate sihost, wait for it to restart, and open procexp, you will see explorer is subprocess of sihost. The CoreWindows seem to be hosted by ApplicationFrameworkHost.

    5. Yeah it looks like explorer does implement alt-tab. I wondered what Raymond was talking about for alt-tab until I realized. I’ve got a different alt-tab UI on my Windows 10 box because it doesn’t run explorer (hog) and get work done. Incidentally, some of the control panel items silently fail to open like this. Boo.

      For task manager, I found it was really broken in Windows 8. It looks like it mostly got fixed in 10 so that’s life. I only care about the “detals”, “performance”, “users”, and “services” tabs anyway (and services only because I can see which service -> which process).

  5. Do you know why Alt+Tab in Win 10 no longer invokes Aero Peek? That’s a change from previous versions that I dislike. When I have multiple monitors, and I want to switch to a window that I know is on a non-primary monitor, I used to be able to press Alt+Tab and look at that monitor. I didn’t need to look at the Alt+Tab UI on the primary monitor; I just kept pressing Tab until the window I wanted became visible. It’s harder to find a window now using Alt+Tab because all windows remain visible.

    1. Can’t believe I never noticed that.

    2. Gee Law says:

      This change annoyed me for a while until I just moved on. My guessing is that Microsoft thought the new Alt+Tab displays thumbnails large enough. The problem is, when you have too many windows, the thumbnail becomes smaller and the area occupied by the task switcher becomes larger. For a single-monitor user, peeking wouldn’t be of much use. But yeah, multi-monitor peek is a very valid scenario.

    3. Wearwolf2500 says:

      The task view stuff using WIN + TAB has them split up by monitor.

  6. Macrosofter says:

    Why I can not select multiple windows on the Taskbar in latest versions of Windows?

  7. ender9 says:

    Speaking of Alt+Tab dialog, any ideas why modern apps show the generic icon in the classic one (since I both use high contrast theme, and usually work with 60 or windows open at the same time, the new dialog just wastes space by showing a bunch of same-coloured rectangles).

Skip to main content