From 875c17fa8f79f0d63a478c7e3befb66869be38aa Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 9 Jul 2003 22:03:21 +0000 Subject: [PATCH] ensure that we don't get stuck in modal loop forever (part of patch 649438) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/dialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 44b80d4354..f54a3164bf 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -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); } } -- 2.47.2