From: Robin Dunn Date: Wed, 10 Apr 2002 20:26:49 +0000 (+0000) Subject: Moved check for m_lastKeydownProcessed to WM_CHAR case because I think X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d9f14e167ecc621c4bd146e3c1edaee85d88a6c0 Moved check for m_lastKeydownProcessed to WM_CHAR case because I think Vadim was asleep when he moved it out of HandleChar to the end of the WM_KEY_DOWN case. It would never be true where the check was before... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/window.cpp b/src/msw/window.cpp index beec10fa02..5a3078a1af 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -2549,18 +2549,8 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam #endif // VK_APPS default: - if ( m_lastKeydownProcessed ) - { - // 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_lastKeydownProcessed = FALSE; - processed = TRUE; - } - else // do generate a CHAR event - { - processed = HandleChar((WORD)wParam, lParam); - } + // do generate a CHAR event + processed = HandleChar((WORD)wParam, lParam); } break; @@ -2586,7 +2576,16 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam case WM_SYSCHAR: case WM_CHAR: // Always an ASCII character - processed = HandleChar((WORD)wParam, lParam, TRUE); + if ( m_lastKeydownProcessed ) + { + // 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_lastKeydownProcessed = FALSE; + processed = TRUE; + } + else + processed = HandleChar((WORD)wParam, lParam, TRUE); break; case WM_HSCROLL: