diff --git a/base/shell/explorer/traywnd.cpp b/base/shell/explorer/traywnd.cpp index a2d49f8010d..868447796fc 100644 --- a/base/shell/explorer/traywnd.cpp +++ b/base/shell/explorer/traywnd.cpp @@ -3049,9 +3049,9 @@ HandleTrayContextMenu: } } - g_MinimizedAll.RemoveAll(); - - if (!bDestroyed) + if (bDestroyed) + g_MinimizedAll.RemoveAll(); + else ::SetForegroundWindow(hwndActive); }