]> git.saurik.com Git - wxWidgets.git/commitdiff
Moved check for m_lastKeydownProcessed to WM_CHAR case because I think
authorRobin Dunn <robin@alldunn.com>
Wed, 10 Apr 2002 20:26:49 +0000 (20:26 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 10 Apr 2002 20:26:49 +0000 (20:26 +0000)
Vadim was asleep when he moved it out of HandleChar to the end of the
WM_KEY_DOWN case. <wink>  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

src/msw/window.cpp

index beec10fa021a3439a3aca01bd9ce3adf8f32986d..5a3078a1aff3afb16116eb586384dbe7e70d47cb 100644 (file)
@@ -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: