#include <gtk/gtk.h>
-//-----------------------------------------------------------------------------
-// global data
-//-----------------------------------------------------------------------------
-
-// Don't allow window closing if there are open dialogs
-int g_openDialogs;
+// this is defined in src/gtk/toplevel.cpp
+extern int wxOpenModalDialogsCount;
//-----------------------------------------------------------------------------
// wxDialog
EndModal( wxID_CANCEL );
}
+ if (show && CanDoLayoutAdaptation())
+ DoLayoutAdaptation();
+
bool ret = wxWindow::Show( show );
if (show) InitDialog();
m_modalShowing = true;
- g_openDialogs++;
+ wxOpenModalDialogsCount++;
// NOTE: gtk_window_set_modal internally calls gtk_grab_add() !
gtk_window_set_modal(GTK_WINDOW(m_widget), TRUE);
gtk_window_set_modal(GTK_WINDOW(m_widget), FALSE);
- g_openDialogs--;
+ wxOpenModalDialogsCount--;
return GetReturnCode();
}