Hethu's Techno Babble

Monday, September 20, 2004

Show Desktop, Minimize All : the difference

Have you ever wondered the difference between the two?

In XP, if you have the QuickLaunch toolbar enabled, you can easily do a Show Desktop by clicking the icon, or by right clicking on the Task Bar and selecting that option, or even easily by doing the keyboard shortcut: WindowsKey + D. (do it again and it will undo the Show Desktop)

You can also do a Minimize All; by using the keyboard shortcut WindwosKey + M. (undo it by using WindowsKey + Shift + M)

So what’s the difference?
Well as it turns out, there is a technical difference between the two operations.

Minimize All is pretty straightforward and does exactly that; it simply minimizes all the windows that has the Minimize icon (ie. windows supporting the minimize operation).

Show Desktop goes a bit further. First, it Minimizes all the windows, then it sets the Z-Order of the desktop to make it come to the front. Why? Because some modal dialogs and some special types of windows may not support the Minimize operation.

So in short, Minimize All simply asks all the open windows to Minimize themselves, while the Show Desktop does the same, plus makes sure that the desktop is not being obstructed by anything that doesn't want to listen to the minimize command.

Now you may wonder, why isn't the original window order always preserved when you undo a Show Desktop? Here's the answer from Raymond Chen of Microsoft:
When the windows are restored when you undo a Show Desktop, Explorer goes through and asks each window that it had minimized to restore itself. If each window is quick to respond, then the windows are restored and the order is preserved.

However, if there is a window that is slow to respond (or even hung), then it loses its chance and Explorer moves on to the next window in the list. That way, a hung window doesn't cause Explorer to hang.

0 Comments:

Post a Comment

<< Home