Fix uniconizing hidden top level windows in wxMSW again

A window that was iconized while hidden, then uniconized while still
hidden would fail to show uniconized. The reason is that Iconize(false)
failed to update m_showCmd. What determines whether that is needed is
not whether Windows considers the window iconized but whether wxWidgets
does.

This was previously fixed in ef40bc3dae (Fix uniconizing hidden top
level windows in wxMSW., 2012-08-05), see #14539, but was broken later
by 3518f1a7d8 (Use a single wxTopLevelWindow::m_showCmd flag in wxMSW,
2018-06-22), so fix it again.

Closes #24117.
This commit is contained in:
Christian Walther 2023-12-04 12:03:24 +01:00 committed by Vadim Zeitlin
parent 0965698c58
commit 96b5c1419b

View file

@ -708,7 +708,7 @@ bool wxTopLevelWindowMSW::IsMaximized() const
void wxTopLevelWindowMSW::Iconize(bool iconize)
{
if ( iconize == MSWIsIconized() )
if ( iconize == IsIconized() )
{
// Do nothing, in particular don't restore non-iconized windows when
// Iconize(false) is called as this would wrongly un-maximize them.