]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/dialog.cpp
fix focus problems in picker controls under MSW which were due to not letting the...
[wxWidgets.git] / src / motif / dialog.cpp
index 95abbae57c29cdab13a46a4ac20df4a03cbc214f..3955a68d4536e6385f011764ffde4e670c3f7e42 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#ifdef __VMS
-#define XtDisplay XTDISPLAY
-#define XtWindow XTWINDOW
-#define XtParent XTPARENT
-#define XtScreen XTSCREEN
-#endif
-
 #include "wx/dialog.h"
 
 #ifndef WX_PRECOMP
@@ -190,6 +183,9 @@ wxDialog::~wxDialog()
 {
     m_isBeingDeleted = true;
 
+    // if the dialog is modal, this will end its event loop
+    Show(false);
+
     delete m_eventLoop;
 
     if (m_mainWidget)
@@ -248,10 +244,16 @@ bool wxDialog::Show( bool show )
     if( !wxWindowBase::Show( show ) )
         return false;
 
+    if ( !show && IsModal() )
+        EndModal(wxID_CANCEL);
+
     m_isShown = show;
 
     if (show)
     {
+        if (CanDoLayoutAdaptation())
+            DoLayoutAdaptation();
+
         // this usually will result in TransferDataToWindow() being called
         // which will change the controls values so do it before showing as
         // otherwise we could have some flicker