]> git.saurik.com Git - wxWidgets.git/commitdiff
Restore an iconized MDI child frame when activating it.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 23 Sep 2012 22:48:39 +0000 (22:48 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 23 Sep 2012 22:48:39 +0000 (22:48 +0000)
Without doing this activating an iconized frame doesn't do anything at all,
i.e. doesn't present it to the user as presumably intended.

Closes #13946.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/mdi.cpp

index 8b0ab4e871ae604c2e874d8bca5de1540426f3c3..68faa155db2ff8fb5a08a883c914fcf3adaa395b 100644 (file)
@@ -1037,6 +1037,11 @@ void wxMDIChildFrame::Activate()
     wxMDIParentFrame * const parent = GetMDIParent();
     if ( parent && parent->GetClientWindow() )
     {
+        // Activating an iconized MDI frame doesn't do anything, so restore it
+        // first to really present it to the user.
+        if ( IsIconized() )
+            Restore();
+
         ::SendMessage(GetWinHwnd(parent->GetClientWindow()), WM_MDIACTIVATE,
                       (WPARAM) GetHwnd(), 0);
     }