[ros-diffs] [fireball] 29395: - Fix a bug with wrong handling of an ALT key pressed together with a mouse click.

fireball at svn.reactos.org fireball at svn.reactos.org
Fri Oct 5 11:37:47 CEST 2007


Author: fireball
Date: Fri Oct  5 13:37:46 2007
New Revision: 29395

URL: http://svn.reactos.org/svn/reactos?rev=29395&view=rev
Log:
- Fix a bug with wrong handling of an ALT key pressed together with a mouse click.

Modified:
    trunk/reactos/subsystems/win32/win32k/ntuser/input.c

Modified: trunk/reactos/subsystems/win32/win32k/ntuser/input.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntuser/input.c?rev=29395&r1=29394&r2=29395&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/input.c (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/input.c Fri Oct  5 13:37:46 2007
@@ -537,6 +537,7 @@
       while (InputThreadsRunning)
       {
          BOOLEAN NumKeys = 1;
+         BOOLEAN bLeftAlt;
          KEYBOARD_INPUT_DATA KeyInput;
          KEYBOARD_INPUT_DATA NextKeyInput;
          LPARAM lParam = 0;
@@ -608,6 +609,21 @@
                    * (For alt, the message that turns on accelerator
                    * display, not sure what for win. Both TODO though.)
                    */
+                   bLeftAlt = FALSE;
+                   if(fsModifiers == MOD_ALT)
+                   {
+                      if(KeyInput.Flags & KEY_E1)
+                      {
+                         gQueueKeyStateTable[VK_RMENU] = 0x80;
+                      }
+                      else
+                      {
+                         gQueueKeyStateTable[VK_LMENU] = 0x80;
+                         bLeftAlt = TRUE;
+                      }
+
+                      gQueueKeyStateTable[VK_MENU] = 0x80;
+                   }
 
                   /* Read the next key before sending this one */
                   do
@@ -650,7 +666,18 @@
                      if (fsModifiers == MOD_WIN)
                         IntKeyboardSendWinKeyMsg();
                      else if (fsModifiers == MOD_ALT)
+                     {
+                        gQueueKeyStateTable[VK_MENU] = 0;
+                        if(bLeftAlt)
+                        {
+                           gQueueKeyStateTable[VK_LMENU] = 0;
+                        }
+                        else
+                        {
+                           gQueueKeyStateTable[VK_RMENU] = 0;
+                        }
                         co_IntKeyboardSendAltKeyMsg();
+                     }
                      continue;
                   }
 




More information about the Ros-diffs mailing list