Why isn’t the original window order always preserved when you undo an Aero Shake?
A customer reported that when they used Aero Shake to minimize all the windows on their desktop, and then used it again to restore all the windows, the restored windows didn’t always have exactly the same z-order as they did originally. The customer wanted to know whether this was expected.
It’s not expected, but it’s not unexpected either.
Aero Shake is a shortcut for the Minimize All and Undo Minimize All commands, and consequently it is subject to all the same constraints as those commands. In particular, it makes a best-effort attempt to restore the windows in the correct order, but if there’s a window that is slow to restore, Explorer doesn’t sit around and wait for the window to finish restoring. It just moves ahead and restores the next window. That way, a hung app doesn’t prevent Explorer from restoring your windows.