X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dfdc483a235dae40290f4f3a69d1f41db6797609..137c8bde085d6d5b7c459902d2ea1a198ab48765:/src/gtk/dialog.cpp?ds=sidebyside 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--;