Unset the debug report preview dialog as critical window when it's hidden.
Otherwise no events can be dispatched to any other window after wxDebugReportPreviewStd::Show() is called, resulting in apparent hanging of the application as can be seen in debugrpt sample. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -46,6 +46,7 @@
|
|||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
#include "wx/evtloop.h" // for SetCriticalWindow()
|
#include "wx/evtloop.h" // for SetCriticalWindow()
|
||||||
|
#include "wx/scopeguard.h"
|
||||||
#endif // __WXMSW__
|
#endif // __WXMSW__
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -517,6 +518,9 @@ bool wxDebugReportPreviewStd::Show(wxDebugReport& dbgrpt) const
|
|||||||
// before entering the event loop (from ShowModal()), block the event
|
// before entering the event loop (from ShowModal()), block the event
|
||||||
// handling for all other windows as this could result in more crashes
|
// handling for all other windows as this could result in more crashes
|
||||||
wxEventLoop::SetCriticalWindow(&dlg);
|
wxEventLoop::SetCriticalWindow(&dlg);
|
||||||
|
|
||||||
|
wxON_BLOCK_EXIT1( wxEventLoop::SetCriticalWindow,
|
||||||
|
static_cast<wxWindow *>(NULL) );
|
||||||
#endif // __WXMSW__
|
#endif // __WXMSW__
|
||||||
|
|
||||||
return dlg.ShowModal() == wxID_OK && dbgrpt.GetFilesCount() != 0;
|
return dlg.ShowModal() == wxID_OK && dbgrpt.GetFilesCount() != 0;
|
||||||
|
Reference in New Issue
Block a user