diff --git a/include/wx/os2/frame.h b/include/wx/os2/frame.h index 94fe07be61..583e29a5d0 100644 --- a/include/wx/os2/frame.h +++ b/include/wx/os2/frame.h @@ -197,7 +197,9 @@ protected: int m_nFsToolBarHeight; bool m_bFsIsMaximized; bool m_bFsIsShowing; + bool m_bIsShown; + wxWindow* m_pWinLastFocused; private: #if wxUSE_TOOLTIPS WXHWND m_hWndToolTip; diff --git a/src/os2/app.cpp b/src/os2/app.cpp index 79f7247026..f03a8e20ed 100644 --- a/src/os2/app.cpp +++ b/src/os2/app.cpp @@ -731,17 +731,33 @@ bool wxApp::ProcessMessage( // // Try translations first; find the youngest window with - // a translation table. + // a translation table. OS/2 has case sensative accels, so + // this block, coded by BK, removes that and helps make them + // case insensative. // if(pMsg->msg == WM_CHAR) { - for(pWnd = pWndThis; pWnd; pWnd = pWnd->GetParent() ) - { - if(pWnd->OS2TranslateMessage(pWxmsg)) - break; - } - } + PBYTE pChmsg = (PBYTE)&(pMsg->msg); + USHORT uSch = CHARMSG(pChmsg)->chr; + bool bRc; + // + // Do not process keyup events + // + if(!(CHARMSG(pChmsg)->fs & KC_KEYUP)) + { + if((CHARMSG(pChmsg)->fs & (KC_ALT | KC_CTRL)) && CHARMSG(pChmsg)->chr != 0) + CHARMSG(pChmsg)->chr = (USHORT)wxToupper((UCHAR)usch); + + for(pWnd = pWndThis; pWnd; pWnd = pWnd->GetParent() ) + { + if(pWnd->OS2TranslateMessage(pWxmsg)) + break; + } + if(!bRc) // untranslated, should restore original value + CHARMSG(pChmsg)->chr = uSch; + } + } // // Anyone for a non-translation message? Try youngest descendants first. //