X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ab75332894d55b557102c5a287727ca635cb1ff..a002ae4e50a0dec9f0090ef8677488d04b0e427a:/src/gtk/msgdlg.cpp diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index 5bbdc930b8..6d1104ae62 100644 --- a/src/gtk/msgdlg.cpp +++ b/src/gtk/msgdlg.cpp @@ -24,10 +24,13 @@ #include "wx/intl.h" #endif +#include "wx/modalhook.h" + #include #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 @@ -273,6 +276,8 @@ void wxMessageDialog::GTKCreateMsgDialog() int wxMessageDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + // break the mouse capture as it would interfere with modal dialog (see // wxDialog::ShowModal) wxWindow * const win = wxWindow::GetCapture(); @@ -291,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);