From 84e58117f86370bd6d303fc388c00da12786fec6 Mon Sep 17 00:00:00 2001 From: Maarten Date: Mon, 22 May 2017 00:19:10 +0200 Subject: [PATCH] Send a wxIconizeEvent when a wxDialog is restored in wxMSW The event is already sent when the dialog is minimized. Send the event in the same way as is done for wxFrame. --- src/msw/dialog.cpp | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 8a7c94945a..577805af5f 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -319,17 +319,24 @@ WXLRESULT wxDialog::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPar break; case WM_SIZE: - if ( m_hGripper ) + switch ( wParam ) { - switch ( wParam ) - { - case SIZE_MAXIMIZED: - ShowGripper(false); - break; + case SIZE_MINIMIZED: + m_iconized = true; + break; - case SIZE_RESTORED: - ShowGripper(true); - } + case SIZE_MAXIMIZED: + wxFALLTHROUGH; + + case SIZE_RESTORED: + if ( m_hGripper ) + ShowGripper( wParam == SIZE_RESTORED ); + + if ( m_iconized ) + (void)SendIconizeEvent(false); + m_iconized = false; + + break; } // the Windows dialogs unfortunately are not meant to be resizable