I am using WinDirStat to scan my D: drive, and its window is slightly slow and unresponsive. I have minimized the already maximized window. Some time later I want to check the progress and I click the taskbar button of WinDirStat. Since it can't response instantly, I find myself quickly clicking the button multiple times (which may become a double-click). Finally the window shows but automatically restores to its non-maximized size.

See the screenshot: maximized window Minimize it and double-click the taskbar button (the highlighted "81% D: - WinDirStat" before the "CH" icon) causes it becoming: non-maximized window

This also happens with other applications such as Firefox, Visual Studio and even Word, when they are unresponsive. Frequently having a non-maximized Firefox is especially annoying. I just masked the filenames in the 2 screenshots in Photoshop and multiple-clicked its taskbar button when it was starting. Then I clearly saw it was maximized at first and became non-maximized next time.

When the applications are not busy, they don't have the problem. The first click on a taskbar button of a minimized window brings it up, and if it is a double-click, the second click is ignored. The window won't restore its size.

Why can the busy window magically become non-maximized? How can I disable the behavior?

  • Thats a real strange behavior. I cant reproduce this problem with my computer but i can give you a hint how to restore the full windows size. There is a windows short cut for full screen just holt down the windows key and then press arrow up and you should get the active windows to full screen. Jun 5, 2014 at 11:38
  • @ingyu9575 , +1 , I saw the exact same behaviour and was going to ask a question. Now I luckily saw your existing question.
    – Prem
    May 17, 2015 at 17:08

1 Answer 1


Now I think I have found out the reason, but I haven't got any idea how to fix it.

For a minimized-maximized window (responsive or not), if I right click the taskbar button and select "Restore" twice, the window will first become non-minimized, and then become non-maximized. This may be what is happening in the question.

If I left click a taskbar button, Explorer checks the window's current state. If it is minimized, a "Restore" message will be sent to it. If it is showing but in background, it will be brought up. If it is already in foreground, it will be minimized.

When the minimized window is responsive, clicking the taskbar button brings it up. If I click again, Explorer will notice the window is already in foreground, and minimize it again.

However, when the window is unresponsive, it will not respond to the "Restore" message, and be stuck in the minimized state. If I click the taskbar button twice, two "Restore" message will sit in queue, since Explorer always see the window as minimized. When the window finally become alive, it starts to process the waiting messages. The first "Restore" brings the window up, and the second one restores the window to non-maximized state.

The underlying problem is that "Minimized" and "Maximized" should be two unrelated property of a window, but Windows mixes them up and uses the same "Restore"(SW_RESTORE) to clear them.

So far I do not know any solution to fix the behavior. I tried to monitor these "Restores" (globally hooking APIs like PostMessage and checking if msg == WM_SYSCOMMAND), without success.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .