]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/dialog.cpp
[ 1509599 ] 'Split pickers page in widgets sample' with more icons and rebaking.
[wxWidgets.git] / src / gtk / dialog.cpp
index 1464cc2563cf84e57e8549208dd50ae23fd59c19..e4caf1baae9686ee239bd7d07f3e80c00e978e5e 100644 (file)
 
 #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 <gdk/gdk.h>
@@ -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--;