From: Robin Dunn Date: Thu, 16 Dec 1999 20:49:07 +0000 (+0000) Subject: Killed a bug that sometimes prevented ShowModal from returning if the X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/995a594ab4c6a9a275ba8094f1f5c7c77f0cf926 Killed a bug that sometimes prevented ShowModal from returning if the ESC key was used. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 531a3fc9c8..2820cfaa33 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -213,6 +213,9 @@ void wxDialog::OnCharHook(wxKeyEvent& event) cancelEvent.SetEventObject( this ); GetEventHandler()->ProcessEvent(cancelEvent); + // 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); return; } }