X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a086de984d366b97e91b39aaba7acd84430d963a..c42a91829519b306f3d423e1f671d5291e5bbc3d:/src/os2/window.cpp diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 3e106c6c6a..dc57ab1911 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -465,6 +465,14 @@ void wxWindowOS2::SetFocus() ::WinSetFocus(HWND_DESKTOP, hWnd); } // end of wxWindowOS2::SetFocus +void wxWindowOS2::SetFocusFromKbd() +{ + // + // Nothing else to do under OS/2 + // + wxWindowBase::SetFocusFromKbd(); +} // end of wxWindowOS2::SetFocus + wxWindow* wxWindowBase::FindFocus() { HWND hWnd = ::WinQueryFocus(HWND_DESKTOP); @@ -2759,20 +2767,7 @@ MRESULT wxWindowOS2::OS2WindowProc( break; default: - if (m_bLastKeydownProcessed) - { - // - // The key was handled in the EVT_KEY_DOWN and handling - // a key in an EVT_KEY_DOWN handler is meant, by - // design, to prevent EVT_CHARs from happening - // - m_bLastKeydownProcessed = FALSE; - bProcessed = TRUE; - } - else // do generate a CHAR event - { - bProcessed = HandleChar((WXDWORD)wParam, lParam); - } + bProcessed = HandleChar(wParam, lParam); } break; } @@ -2790,7 +2785,7 @@ MRESULT wxWindowOS2::OS2WindowProc( } else // do generate a CHAR event { - bProcessed = HandleChar((WXDWORD)wParam, lParam, TRUE); + bProcessed = HandleChar(wParam, lParam, TRUE); break; } } @@ -4050,7 +4045,7 @@ wxKeyEvent wxWindowOS2::CreateKeyEvent( // WM_KEYDOWN one // bool wxWindowOS2::HandleChar( - WXDWORD wParam + WXWPARAM wParam , WXLPARAM lParam , bool isASCII ) @@ -4073,7 +4068,7 @@ bool wxWindowOS2::HandleChar( // // If 1 -> 26, translate to CTRL plus a letter. // - vId = wParam; + vId = (int)wParam; if ((vId > 0) && (vId < 27)) { switch (vId) @@ -4098,7 +4093,7 @@ bool wxWindowOS2::HandleChar( } else // we're called from WM_KEYDOWN { - vId = wxCharCodeOS2ToWX(wParam); + vId = wxCharCodeOS2ToWX((int)wParam); if (vId == 0) return FALSE; }