X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dfdc483a235dae40290f4f3a69d1f41db6797609..b84aec037f06174a9e911aa9c9307c2a4e5b8f0b:/src/gtk/dialog.cpp diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 31df13df6b..e4caf1baae 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dialog.cpp +// Name: src/gtk/dialog.cpp // Purpose: // Author: Robert Roebling // Id: $Id$ @@ -11,9 +11,13 @@ #include "wx/wxprec.h" #include "wx/dialog.h" -#include "wx/frame.h" -#include "wx/app.h" -#include "wx/cursor.h" + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/frame.h" + #include "wx/cursor.h" +#endif // WX_PRECOMP + #include "wx/evtloop.h" #include @@ -206,11 +210,12 @@ int wxDialog::ShowModal() g_openDialogs++; - gtk_grab_add( m_widget ); + // NOTE: gtk_window_set_modal internally calls gtk_grab_add() ! + gtk_window_set_modal(GTK_WINDOW(m_widget), TRUE); wxEventLoop().Run(); - gtk_grab_remove( m_widget ); + gtk_window_set_modal(GTK_WINDOW(m_widget), FALSE); g_openDialogs--;