[EXPLORER] Restore windows on second click of Show Desktop button (#7184)

On the second click on "Show desktop" button, the minimized windows
are not restored, because after the first click, and the addition to
`CSimpleArray<MINWNDPOS> g_MinimizedAll`, a call to `RestoreMinimizedNonTaskWnds()`
via `HSHELL_WINDOWACTIVATED` message clears the list of minimized windows.

Don't empty `g_MinimizedAll` while processing HSHELL_WINDOWCREATED or
HSHELL_WINDOWACTIVATED messages (bDestroyed=FALSE).

Empty `g_MinimizedAll` only when SendPulseToTray is called with bDestroyed=TRUE.

Addendum to e6bced7a35 and 70d7009ad9. CORE-19703 CORE-15369
This commit is contained in:
Jose Carlos Jesus 2024-08-02 15:36:26 +01:00 committed by GitHub
parent 191d716cb2
commit 045333e890
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3049,9 +3049,9 @@ HandleTrayContextMenu:
}
}
g_MinimizedAll.RemoveAll();
if (!bDestroyed)
if (bDestroyed)
g_MinimizedAll.RemoveAll();
else
::SetForegroundWindow(hwndActive);
}