]> git.saurik.com Git - wxWidgets.git/commitdiff
Dialog updates
authorDavid Webster <Dave.Webster@bhmi.com>
Mon, 21 Jan 2002 18:45:09 +0000 (18:45 +0000)
committerDavid Webster <Dave.Webster@bhmi.com>
Mon, 21 Jan 2002 18:45:09 +0000 (18:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/os2/dialog.cpp
src/os2/window.cpp

index edc04a0d243b4f1b784df71baa9cd0e4683af43e..eb635379c9397889fc060f65593ee8d60ef6634a 100644 (file)
@@ -200,7 +200,11 @@ void wxDialog::DoShowModal()
     //
     wxASSERT_MSG(!m_pWindowDisabler, _T("disabling windows twice?"));
 
     //
     wxASSERT_MSG(!m_pWindowDisabler, _T("disabling windows twice?"));
 
-    m_pWindowDisabler = new wxWindowDisabler(this);
+    //
+    // Disables other app windows and window proc message processing
+    // until WinDismissDlg called
+    //
+    ::WinProcessDlg((HWND)GetHwnd());
 
     //
     // Enter the modal loop
 
     //
     // Enter the modal loop
@@ -243,7 +247,8 @@ bool wxDialog::Show(
         //
         // If we had disabled other app windows, reenable them back now because
         // if they stay disabled Windows will activate another window (one
         //
         // If we had disabled other app windows, reenable them back now because
         // if they stay disabled Windows will activate another window (one
-        // which is enabled, anyhow) and we will lose activation
+        // which is enabled, anyhow) and we will lose activation.  We really don't
+        // do this in OS/2 since PM does this for us.
         //
         if (m_pWindowDisabler)
         {
         //
         if (m_pWindowDisabler)
         {
@@ -326,6 +331,7 @@ void wxDialog::EndModal(
 {
     SetReturnCode(nRetCode);
     Show(FALSE);
 {
     SetReturnCode(nRetCode);
     Show(FALSE);
+    ::WinDismissDlg((HWND)GetHwnd(), nRetCode);
 } // end of wxDialog::EndModal
 
 // ----------------------------------------------------------------------------
 } // end of wxDialog::EndModal
 
 // ----------------------------------------------------------------------------
index 1dda24c9c9dc4e3080498e527f6fffbaa31935d7..9bc6c64ae5f942fdaf42ab4d55a466542a30107a 100644 (file)
@@ -2466,11 +2466,14 @@ MRESULT wxWindowOS2::OS2WindowProc(
             if (IsKindOf(CLASSINFO(wxDialog)))
             {
                 PSWP                pSwp = (PSWP)PVOIDFROMMP(wParam);
             if (IsKindOf(CLASSINFO(wxDialog)))
             {
                 PSWP                pSwp = (PSWP)PVOIDFROMMP(wParam);
+                PSWP                pSwp2 = pSwp++;
 
 
-                bProcessed = HandleSize( pSwp->cx
-                                        ,pSwp->cy
-                                        ,(WXUINT)lParam
-                                       );
+                if (!(pSwp->cx == pSwp2->cx &&
+                      pSwp->cy == pSwp2->cy))
+                    bProcessed = HandleSize( pSwp->cx
+                                            ,pSwp->cy
+                                            ,(WXUINT)lParam
+                                           );
             }
             break;
 
             }
             break;