diff --git a/src/gtk/colordlg.cpp b/src/gtk/colordlg.cpp index 87b61d2d44..b3a806d5b2 100644 --- a/src/gtk/colordlg.cpp +++ b/src/gtk/colordlg.cpp @@ -28,6 +28,7 @@ #include #include "wx/gtk/private.h" #include "wx/gtk/private/gtk2-compat.h" +#include "wx/gtk/private/dialogcount.h" #if wxUSE_LIBHILDON #include @@ -87,6 +88,8 @@ int wxColourDialog::ShowModal() ColourDataToDialog(); + wxOpenModalDialogLocker modalLocker; + gint result = gtk_dialog_run(GTK_DIALOG(m_widget)); gtk_widget_hide(m_widget); diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index b01e51b13e..2c561dfca3 100644 --- a/src/gtk/msgdlg.cpp +++ b/src/gtk/msgdlg.cpp @@ -30,6 +30,7 @@ #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 @@ -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);