X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4e621d24713f971d1a2d440f79ccc4593aede4b6..d180df5c431d4dc9e788141794fd51fe1f39ad3e:/src/gtk/msgdlg.cpp diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index 906867c254..b01e51b13e 100644 --- a/src/gtk/msgdlg.cpp +++ b/src/gtk/msgdlg.cpp @@ -24,6 +24,8 @@ #include "wx/intl.h" #endif +#include "wx/testing.h" + #include #include "wx/gtk/private.h" #include "wx/gtk/private/messagetype.h" @@ -273,6 +275,8 @@ void wxMessageDialog::GTKCreateMsgDialog() int wxMessageDialog::ShowModal() { + WX_TESTING_SHOW_MODAL_HOOK(); + // break the mouse capture as it would interfere with modal dialog (see // wxDialog::ShowModal) wxWindow * const win = wxWindow::GetCapture(); @@ -292,6 +296,7 @@ int wxMessageDialog::ShowModal() gtk_window_present( GTK_WINDOW(m_parent->m_widget) ); gint result = gtk_dialog_run(GTK_DIALOG(m_widget)); + GTKDisconnect(m_widget); gtk_widget_destroy(m_widget); g_object_unref(m_widget); m_widget = NULL;