From f3e4a2a4146a4a28fedce563f42f1e3f38462d80 Mon Sep 17 00:00:00 2001 From: David Webster Date: Mon, 21 Jan 2002 18:45:09 +0000 Subject: [PATCH] Dialog updates git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/os2/dialog.cpp | 10 ++++++++-- src/os2/window.cpp | 11 +++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/os2/dialog.cpp b/src/os2/dialog.cpp index edc04a0d24..eb635379c9 100644 --- a/src/os2/dialog.cpp +++ b/src/os2/dialog.cpp @@ -200,7 +200,11 @@ void wxDialog::DoShowModal() // 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 @@ -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 - // 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) { @@ -326,6 +331,7 @@ void wxDialog::EndModal( { SetReturnCode(nRetCode); Show(FALSE); + ::WinDismissDlg((HWND)GetHwnd(), nRetCode); } // end of wxDialog::EndModal // ---------------------------------------------------------------------------- diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 1dda24c9c9..9bc6c64ae5 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -2466,11 +2466,14 @@ MRESULT wxWindowOS2::OS2WindowProc( 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; -- 2.49.0