Why does a flashing taskbar result in a fullscreen console returning to windowed mode?

Raymond Chen

Commenter Daniel wonders why a flashing taskbar results in a fullscreen console returning to windowed mode.

I didn’t know the answer to this, but I formulated a guess, and I was ready to just post my guess. (Because everything I write is just conjecture anyway. Informed conjecture, but still.) But I had some time, so I went spelunking through the code history and about a half hour later, I found confirmation for my guess, so now it’s not just a guess but a fact. (Don’t expect me to go to all this effort in general. Guessing is a lot less time-consuming.)

The code to force a fullscreen console into windowed mode when a window flashes was introduced in Windows 2000, and I even found the bug report that led to the change, suitably edited of course:

Title: A flashing window should ensure that the taskbar (and the window itself?) are both visible
Date submitted: November 7, 1997

This is a problem similar to the auto-hide taskbar situation. If the taskbar is not visible, it has to be shown when flashed. This may force a full screen switch.

If the system is in full screen mode (ie, open a command window and type alt-enter), then if someone calls FlashWindow the user won’t see the flashing window. So we have to make the screen switch to windowed mode. This is especially bad when someone calls SetForegroundWindow but we don’t let him take the foreground; we simply flash the window instead.

The bug report pretty much lays out the justification for this change in behavior, so I’ll leave it as it is.


Discussion is closed.

Feedback usabilla icon