]> git.saurik.com Git - wxWidgets.git/commitdiff
ensure that we don't get stuck in modal loop forever (part of patch 649438)
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 9 Jul 2003 22:03:21 +0000 (22:03 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 9 Jul 2003 22:03:21 +0000 (22:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/dialog.cpp

index 44b80d4354605df84e1d7db826477ed11c27c98a..f54a3164bf9dff6b019846534a1a7f74ba57aaee 100644 (file)
@@ -333,6 +333,10 @@ bool wxDialog::Show(bool show)
             // this will cause IsModalShowing() return FALSE and our local
             // message loop will terminate
             wxModalDialogs.DeleteObject(this);
+
+            // ensure that there is another message for this window so the
+            // ShowModal loop will exit and won't get stuck in GetMessage().
+            ::PostMessage(GetHwnd(), WM_NULL, 0, 0);
         }
     }