Why are taskbar live previews lost when you use Fast User Switching?

Raymond Chen

Anonymous asks a metric buttload of questions, which means that I feel compelled to answer all or none. And given the choice, I decided to answer none. Okay, I will answer one and ignore the rest. Why are taskbar live previews lost when you use Fast User Switching? When you switch away from a user via Fast User Switching, the Desktop Window Manager for that session is turned off. After all, since that session no longer has access to the screen, there’s no point running all this code and consuming all this memory for something nobody can see. When the Desktop Window Manager restarts upon reactivation of a session, it can recovery nearly all of the information it needs: It can enumerate all the windows and obtain their positions and styles. For each visible window, it can send a WM_PAINT message to ask it to paint its contents afresh. But if the window is minimized, the Desktop Window Manager has no way to get at the application’s non-minimized pixels, because the application will respond to the WM_PAINT message by saying, “My client area is 0×0. I will therefore paint nothing!”

This is one of those tradeoffs that you have to make when engineering software. The benefit of shutting down the Desktop Window Manager when it is not being used exceeds the cost of losing thumbnails for minimized applications. Until the application is restored (and can therefore be sent a WM_PAINT message to get it to paint its client area at its restored size), the Desktop Window Manager merely shows a placeholder bitmap.

0 comments

Discussion is closed.

Feedback usabilla icon