X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/643e9cf9f61fdbe517b15477f9247ca8ac0b3578..fb8d7eb7a880f1f2e32d8830f9c5e12b2536e05f:/src/gtk/msgdlg.cpp?ds=inline

diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp
index b01e51b13e..6d1104ae62 100644
--- a/src/gtk/msgdlg.cpp
+++ b/src/gtk/msgdlg.cpp
@@ -24,12 +24,13 @@
     #include "wx/intl.h"
 #endif
 
-#include "wx/testing.h"
+#include "wx/modalhook.h"
 
 #include <gtk/gtk.h>
 #include "wx/gtk/private.h"
 #include "wx/gtk/private/messagetype.h"
 #include "wx/gtk/private/mnemonics.h"
+#include "wx/gtk/private/dialogcount.h"
 
 #if wxUSE_LIBHILDON
     #include <hildon-widgets/hildon-note.h>
@@ -275,7 +276,7 @@ void wxMessageDialog::GTKCreateMsgDialog()
 
 int wxMessageDialog::ShowModal()
 {
-    WX_TESTING_SHOW_MODAL_HOOK();
+    WX_HOOK_MODAL_DIALOG();
 
     // break the mouse capture as it would interfere with modal dialog (see
     // wxDialog::ShowModal)
@@ -295,6 +296,8 @@ int wxMessageDialog::ShowModal()
     if (m_parent)
         gtk_window_present( GTK_WINDOW(m_parent->m_widget) );
 
+    wxOpenModalDialogLocker modalLocker;
+
     gint result = gtk_dialog_run(GTK_DIALOG(m_widget));
     GTKDisconnect(m_widget);
     gtk_widget_destroy(m_widget);