]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
rename g_openDialogs to wxOpenModalDialogsCount and define it in toplevel.cpp to...
[wxWidgets.git] / src / gtk / toplevel.cpp
index caca06176dced148fc4132634456fc1e23408b20..89a57919786cbf241a16d0aaea8e008ca3c272b8 100644 (file)
@@ -54,7 +54,9 @@
 // data
 // ----------------------------------------------------------------------------
 
-extern int              g_openDialogs;
+// this is incremented while a modal dialog is shown
+int wxOpenModalDialogsCount = 0;
+
 extern wxWindowGTK     *g_delayedFocus;
 
 // the frame that is currently active (i.e. its child has focus). It is
@@ -275,7 +277,7 @@ gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget),
                            wxTopLevelWindowGTK *win )
 {
     if (win->IsEnabled() &&
-        (g_openDialogs == 0 || (win->GetExtraStyle() & wxTOPLEVEL_EX_DIALOG) ||
+        (wxOpenModalDialogsCount == 0 || (win->GetExtraStyle() & wxTOPLEVEL_EX_DIALOG) ||
          win->IsGrabbed()))
         win->Close();