]> 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 81c8bc62490990d7aed89687866c3698e832d528..e4caf1baae9686ee239bd7d07f3e80c00e978e5e 100644 (file)
@@ -15,9 +15,9 @@
 #ifndef WX_PRECOMP
     #include "wx/app.h"
     #include "wx/frame.h"
 #ifndef WX_PRECOMP
     #include "wx/app.h"
     #include "wx/frame.h"
+    #include "wx/cursor.h"
 #endif // WX_PRECOMP
 
 #endif // WX_PRECOMP
 
-#include "wx/cursor.h"
 #include "wx/evtloop.h"
 
 #include <gdk/gdk.h>
 #include "wx/evtloop.h"
 
 #include <gdk/gdk.h>
@@ -210,11 +210,12 @@ int wxDialog::ShowModal()
 
     g_openDialogs++;
 
 
     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();
 
 
     wxEventLoop().Run();
 
-    gtk_grab_remove( m_widget );
+    gtk_window_set_modal(GTK_WINDOW(m_widget), FALSE);
 
     g_openDialogs--;
 
 
     g_openDialogs--;