Calling Iconize(false) on a maximized window restored it to its normal state
instead of doing nothing as expected.
Return immediately from Iconize() if the requested state is already the
current one to avoid it.
Closes #13373.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68493
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxTopLevelWindowMSW::Iconize(bool iconize)
{
+ if ( iconize == m_iconized )
+ {
+ // Do nothing, in particular don't restore non-iconized windows when
+ // Iconize(false) is called as this would wrongly un-maximize them.
+ return;
+ }
+
if ( IsShown() )
{
// change the window state immediately