X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/670f9935630beb2123a5ca62894ae92a3f0efa4f..137c8bde085d6d5b7c459902d2ea1a198ab48765:/src/gtk/dialog.cpp diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 1464cc2563..e4caf1baae 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -14,10 +14,10 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/frame.h" + #include "wx/cursor.h" #endif // WX_PRECOMP -#include "wx/frame.h" -#include "wx/cursor.h" #include "wx/evtloop.h" #include @@ -210,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--;