"Show Desktop" sometimes sets a window to "always on top"

36

26

No worries, not another "where is my show desktop button gone" question.

What I found under Windows 7, when you use the "Show Desktop" feature (I prefer the ⊞ Win + D shortcut) and then bring all windows back by using it again, some windows behave as if they're glued to the front of the z-order. What this means is, say, I have windows A B and C open, with focus on A, hit ⊞ Win + D twice, and now it may happen that if I then want to switch to B or C, either by Alt+Tab or by selecting them on the taskbar, the taskbar shows the highlight, but A stays visible (and usable, it's not just a rendering issue) in the foreground.

Imagine the following situations, all three windows cascading and overlapping:

A (focus)
B
C

-> ⊞ Win + D

Desktop (focus)

-> ⊞ Win + D

A (focus)
B
C

-> click C on taskbar

A
C (focus)
B

-> click B on taskbar

A
B (focus)
C

And so on. Focus means actual input focus, i.e. in second situation, any keyboard typing is sent to window B while window A is in the foreground.

It does not matter what kind of application; in my current case an instance of Outlook and an instance of Explorer is stuck, while a second instance of Explorer and an instance of Firefox behave normally. This should show that this problem can occur even between multiple instances of the same application, and that there are no fancy applications involved that like to pretend they are the most important program and internally force "always on top".

Showing and unshowing the desktop again doesn't help; in the worst case another window might end up with the "glued to the top of the z-order" too. Between those, I can easily switch, but in order to get a window which still behaves normally on top, I have to manually minimize the offending windows.

The only cure seems to close the offending windows so far, I've not found anything else that helps.

Could it be that Windows 7 has a bug that can force an ALWAYS_ON_TOP flag onto some windows when restoring from "Show Desktop", or am I doing something wrong?

More information:

⊞ Win+d issue easy to replicate on Win7-64bit-Ultimate.

The affected windows (of any program) seem to be placed into a separate "Z" group. You can place multiple/many windows into this always-on-top state, those in the affected state will function normally in relation to each other with the exception that:

  • The group as a whole is always-on-top of any non-affected window
  • The whole group is in front of the taskbar.
  • The whole group does not respond to (context on taskbar) "cascade windows" or similar commands.

The fact that the affected windows are on top of the taskbar and otherwise function as "special windows" shows that windows 7 must have a hidden "feature" of always-on-top that gets applied with the show desktop function. The feature appears to place windows in a super window state that is on top of the taskbar (the normal group remaining behind the taskbar). When you click the start menu or context menu of the taskbar, the start menu/taskbar comes to the foreground of the always-on-top group, however this does not revert the affected windows, only a temporary takeover until you switch to something other than the start menu/taskbar.

This is key to finding an answer. How do we get windows to unassign the special super status or not do the assignment in the first place?

Even More info from another user: It appeared to have cleared by closing all windows and restarting. Initially I could not reproduce the error, then after opening all my working windows, I did indeed reproduce it on any window.

I almost think it could be initialized with something to do with multiple windows of Chrome, and then the show desktop problem will crop up once one window has it. This was because: After messing around some more with a chrome session saver (session buddy) and restoring sessions and getting the super state, I restored and closed the window I was in and now I am again at a place where I can not reproduce the error, even in my "work environment" with some 35 chrome tabs in two windows, plus other programs, file locations, remote desktops and a second chrome profile with another dozen tabs.

So, back to square one with finding the actual instigator of the super state phenomenon.

Once you actually have the super sate issue, the following will reproduce: Ok, I am doing this as I type it:

Open chrome (to view this website), then Notepad, then Calculator, (could be any windows, but for the purpose of demonstration, follow along with me)

The windows should function normally, overlap your windows so that you can see the edge of all windows and the Z-order is (from front to back):the browser on top, then the calculator, then Notepad (you should be able to see part of the background windows).

Now, with the browser on top, press win+d, then win+d again.

Click on Calculator, then your browser, your browser is now stuck in the foreground. Clicking on notepad will bring the focus to notepad, and it will be in front of the calculator, yet it will stay behind the browser, as your browser is in "super state". (many arrangements of switching focus after returning from win+d will create the problem, with the exeption of clicking the desktop, I also noticed that I could not get calculator into super state unless it overlapped my chrome browser).

Again, this does not seem to work until at least one of your windows is affected.

We still do not know how to get the initial window into Superstate, only subsequent ones.

Mephane

Posted 2011-04-11T13:37:48.067

Reputation: 511

Thanks for the edit, Gareth. How do I make these key icons instead of their names? I suppose you didn't manually include images, did you? – Mephane – 2011-06-08T07:32:51.047

1you surround the key name with < kbd > < /kbd > – Gaff – 2011-08-03T16:24:13.947

Answers

50

Recently experienced this issue. Unsure how it started, but I was able to put windows to this "super window" state with ⊞ win + d twice and clicking on a different window. I was going to try the Ctrl + Shift + Esc shortcut to open the Task Manager but hit Ctrl + Alt + Esc instead and the window returned to the normal state. I was able to successfully return all windows to their normal state using the key sequence on each window and ⊞ win + d no longer puts windows to the "super window" state. Hope this helps.

Tim

Posted 2011-04-11T13:37:48.067

Reputation: 501

As far as I can tell it is intended to minimize the current window. Thanks for the tip @Tim – gsnerf – 2014-07-21T09:48:48.143

1This helps temporarily, but the problem recurs for me after just a few moments, sadly. – Scott – 2015-02-13T14:34:58.190

3Ctrl+Alt+Esc seems to work for me too. I just started experiencing a similar issue with my 8.1 Ent desktop last week. Windows from any app would get "stuck" in the background of other apps' windows. I could move the background window and work in it, but it would still stay behind. I went to every window and pressed C+A+Esc and it worked. I'll see if it returns. – Richard – 2015-02-19T18:02:32.257

Well this doesn't fix it for me after all. Still having the same problem. – Richard – 2015-02-24T22:51:18.770

1I tried Ctrl+Alt+Esc when I read it on a different website but no luck, went ahead and tried it here - hitting it 3-4 more times finally did it.. no idea what's going on here. – Charlie Wynn – 2015-10-15T13:21:24.803

1This is still an issue in Windows 10 (actually the only place I've experienced it - with both Internet Explorer and Firefox... hmm...); repeatedly switching focus to-from the always-on-top window then pressing the combination until the window disappears behind another fixed it. Trouble is, I've now got a context menu that won't go away... – wizzwizz4 – 2017-02-20T19:44:00.687

1Confirmed with Firefox and Outlook on Win10. I think its solely Alt+Esc solving the issue. "Lower the focused window Alt+Esc" from Wikipedia. Can't find much docs / how to raise focus? Only happened with maximized windows for me, stuck "above" other windows. – kevinf – 2017-07-31T20:53:31.133

3Thank you. This should be the accepted answer. I don't know what C+A+E actually does, but it does fix this very annoying problem without having to juggle windows around or closing applications. – Casper – 2014-02-15T02:39:49.637

5

I use "Show Desktop" as a mouse-button command and have noticed the same thing you are experiencing. On occasion, certain windows, when focused upon while pressing the "Show Desktop" button, and then after pressing the "Show Desktop" button again and executing the reverse command, will behave as 'always on top' windows.

I've noticed it with Internet Explorer, Windows Explorer, and OUtlook. I'm running Windows 7, Ultimate, x64. No solution but to close and reopen the window for me either.

I'm interested, though, in intentionally executing this command without third party software running from the system tray.

EDIT 9/29/11

In furtherance to my original comment, I have found a solution/workaround for this issue - but this solution is specific to my system because I use UltraMon and you would have to install that program for this to work for you. In addition, it has to be UltraMon version 3.1.0 or later. After downloading and installing the software, go to http://www.realtimesoft.com/ultramon/scripts/ and download the "Always on Top" script. It's a .vbs file that performs this function:

_Set wnd = CreateObject("UltraMon.Window")
If wnd.GetForegroundWindow() = True Then
    If wnd.AlwaysOnTop = True Then
        wnd.AlwaysOnTop = False
    Else
        wnd.AlwaysOnTop = True
    End If
    wnd.ApplyChanges 0
End If_

Then open up UltraMon Options and go to the Hotkeys tab and select "Run application or script" and click on Add Hotkey. A modal dialog box will open where you should enter the keyboard prompt (combination) you want to use, target to the script we downloaded earlier, and then click ok. Now you've got a hotkey combination that will toggle between enable and disable for the Always_on_Top value. So when the bug occurs while you're Showing Desktop or Undoing Show Desktop, we now have a quick keyboard fix. And like I commented above, if you want windows to be forced to the front intentionally, which can be helpful at times, you now have the option to do that as well.

This works for me because I keep UltraMon open at all times. It's a great program, but a lot of the features were already covered by my video card, so I was considering removing it altogether, but now it's ensured it's place on my computer with this valubale feature.

And if anyone has any insight on the script above and whether it can be applied to an active window without the need for Ultramon to be loaded, please feel free to contribute to my answer. Thanks.

SpewHole

Posted 2011-04-11T13:37:48.067

Reputation: 61

This should be a comment on the main question; it is not an answer. – Darth Android – 2011-06-08T18:06:54.780

3Darth Android, I did not know at the time how to leave a comment response to a question in lieu of an answer, but if you want to get technical about it, Mephane asked if Windows 7 had a bug and I concurred that it did by sharing my similiar experience. Maybe besides pointing out how it's erroneous, you could perhaps, point me in the right direction regarding how to leave a comment on someone's question, because it was not readily clear at the time. At any rate, I'm editing my response with an actual solution (of sorts) so please reconsider your (-1) vote. Thanks. – SpewHole – 2011-09-29T11:27:37.870

5

Two work arounds:

I use win+D. Issue easy to replicate, Win7-64bit-Ultimate.

Workaround One Elevate all windows to the superstate so that they interact normally with one another. The problem with this work around is that new windows will still open behind all of your super state windows, which can be very annoying to try to find if you have many windows and/or many monitors.

Workaround Two The other semi-solution is to close the process and open it back up. The new window will be in the normal state it but the issue can recur if I use Win+d, which can lead to a lot of closing and reopening dozens of windows to avoid the issue.

Jared W Boudreau

Posted 2011-04-11T13:37:48.067

Reputation: 55

1

There's actually an old program that can fix this issue, I just couldn't recall the name of it until now. It's a utility from back in the day called WinExplorer, by Nirsoft. It has an option, under the Size & Position tab, called "Set To No Topmost" that will remove the "always on top" behavior from a window. I've just used it on Windows 7 to fix the very problem described above, where "Show Desktop" messes things up. It's still available here: http://www.nirsoft.net/utils/winexp.html

mmortal03

Posted 2011-04-11T13:37:48.067

Reputation: 186

1

I know it's been almost 8 years, but if I'm still struggling with this problem in windows 10, certainly there are more people facing this issue in 2019.

Apparently it has something to do with a window style called "WS_MINIMIZEBOX" being enabled on windows always on top. I think it causes some sort of bug or something like. The way I was able to workaround this issue was using a program called AutoHotkey (great program by the way) and creating a "Always on Top" functionality that makes the window on top and also disables this "WS_MINIMIZEBOX".

In another words, instead of you guys using the original always on top function of wherever program you are using – let's say you are using media player classic, instead of using the always on top function inside the media player classic software – you will use this script to make the desired window to be always on top. I set the hotkey as windows+a (if you want to change the shortcut for something more suitable to your needs, just take a look the Key List on AutoHotkey's site, it's super simple to change and you can set practically any key combinations you wish). Here's my script, just save it in a text file and then change the file format to .ahk

The only hurtle with my solution is that you lose the ability of minimizing that window until you close it again. But, I assume that if you are working with a window always on top you probably don't want to minimize it. Also, although you can't minimize you can remove the always on top option, just by pressing windows+a again, so if you don't want to see a window always on top anymore just press it again. I'm sure that are more elegant/functional ways to deal with this issue, but that is what I was able to come up with.

;Better Always on Top
count = 1
#a::
If count = 1
{
WinSet, Style, -0x20000, A
Winset, Alwaysontop, , A
return
}
Else If count = 2
{
WinSet, Style, ^0x20000, Off ;WS_MINIMIZEBOX
Winset, Alwaysontop, Off
return
}
Return

Estranhosidade

Posted 2011-04-11T13:37:48.067

Reputation: 21

1

I have found this to be a problem with Nvidia WMI Provider. I had two instances of this running (one was a 32-bit version). I stopped the 32-bit version and the problem went away.

BJH

Posted 2011-04-11T13:37:48.067

Reputation: 11

0

Lot's of folks describing the problem that has been pestering me for some time now, but not a lot of helpful fixes. However, I did go through and clean out a bunch of processes/backgrounds apps configured to startup with Windows. I haven't gone back through them one by one to identify the culprit, but for now the problem seems to be solved. I can alt+tab through multiple open windows without any of them getting stuck on top.

So, that would be my recommendation: Take your startup apps down to the bare bones. It seems likely that something in there is causing the problem.

WIN7: WIN+R, startup tab, disable anything you think you can live without running at startup.

WIN10 - ctrl+alt+del, task mgr, startup tab, again disable everything you can

Rob S

Posted 2011-04-11T13:37:48.067

Reputation: 1

0

I have the exact same issue on Windows 7 from time to time. It becomes really annoying to use my machine because windows are stuck on the screen. I used to restart my machine when this happened but found an easier workaround.

What I do is to end the explorer process and start it again. I do the following:

  1. Open Task Manager (You can use the shortcut Crtl + Shift + Esc).
  2. Click on the Processes Tab and locate the process called "explorer".
  3. End the "explorer" process by right-clicking and selecting End Process. This will close all open folders, all other programs are left open.
  4. Still in you Task manager, click on File and select New Task(Run...).
  5. Type explorer in the input box and click Ok. This will start explorer again.

The sticky windows should be gone now.

kkd

Posted 2011-04-11T13:37:48.067

Reputation: 1

1This does not work for me on Win7 64-bit – JustinJDavies – 2013-10-17T08:48:39.060

0

In windows 7 go to Control Panel>> Ease of Access>> Ease of Access Center>> Scroll Down to Make the Mouse Easier to Use>> Scroll Down to Make it Easier to Manage Windows>> UN-check the box for "Activate a Window by Hovering over it with the mouse". Now when you open a new window that window will stay on top and allow you to select it without it disappearing.

Turewar

Posted 2011-04-11T13:37:48.067

Reputation: 1

Nope... sounds like a different problem. – jan-glx – 2016-12-20T11:02:49.433

0

In my case this bug appeared when I watched movies in Daum PotPlayer. I have "always on top" enabled in player and when I minimize all windows with Win+D hotkey and restore them the same way, somehow active (in focus) program becomes on top of others. I disabled "always on top" in player and bug disappeared... at least for now.

Mug-why

Posted 2011-04-11T13:37:48.067

Reputation: 1