-remove hotkey lock
[reactos.git] / reactos / subsys / win32k / ntuser / input.c
index 57a8f77..05b2887 100644 (file)
@@ -35,7 +35,7 @@
 #define NDEBUG
 #include <debug.h>
 
-extern BYTE QueueKeyStateTable[];
+extern BYTE gQueueKeyStateTable[];
 
 /* GLOBALS *******************************************************************/
 
@@ -377,7 +377,7 @@ IntKeyboardSendWinKeyMsg()
    PWINDOW_OBJECT Window;
    MSG Mesg;
 
-   if (!(Window = IntGetWindowObject(InputWindowStation->ShellWindow)))
+   if (!(Window = UserGetWindowObject(InputWindowStation->ShellWindow)))
    {
       DPRINT1("Couldn't find window to send Windows key message!\n");
       return;
@@ -390,8 +390,6 @@ IntKeyboardSendWinKeyMsg()
 
    /* The QS_HOTKEY is just a guess */
    MsqPostMessage(Window->MessageQueue, &Mesg, FALSE, QS_HOTKEY);
-
-   ObmDereferenceObject(Window);
 }
 
 STATIC VOID STDCALL
@@ -1026,42 +1024,42 @@ IntMouseInput(MOUSEINPUT *mi)
    Msg.message = 0;
    if(mi->dwFlags & MOUSEEVENTF_LEFTDOWN)
    {
-      QueueKeyStateTable[VK_LBUTTON] |= 0xc0;
+      gQueueKeyStateTable[VK_LBUTTON] |= 0xc0;
       Msg.message = SwapBtnMsg[0][SwapButtons];
       CurInfo->ButtonsDown |= SwapBtn[SwapButtons];
       MsqInsertSystemMessage(&Msg);
    }
    else if(mi->dwFlags & MOUSEEVENTF_LEFTUP)
    {
-      QueueKeyStateTable[VK_LBUTTON] &= ~0x80;
+      gQueueKeyStateTable[VK_LBUTTON] &= ~0x80;
       Msg.message = SwapBtnMsg[1][SwapButtons];
       CurInfo->ButtonsDown &= ~SwapBtn[SwapButtons];
       MsqInsertSystemMessage(&Msg);
    }
    if(mi->dwFlags & MOUSEEVENTF_MIDDLEDOWN)
    {
-      QueueKeyStateTable[VK_MBUTTON] |= 0xc0;
+      gQueueKeyStateTable[VK_MBUTTON] |= 0xc0;
       Msg.message = WM_MBUTTONDOWN;
       CurInfo->ButtonsDown |= MK_MBUTTON;
       MsqInsertSystemMessage(&Msg);
    }
    else if(mi->dwFlags & MOUSEEVENTF_MIDDLEUP)
    {
-      QueueKeyStateTable[VK_MBUTTON] &= ~0x80;
+      gQueueKeyStateTable[VK_MBUTTON] &= ~0x80;
       Msg.message = WM_MBUTTONUP;
       CurInfo->ButtonsDown &= ~MK_MBUTTON;
       MsqInsertSystemMessage(&Msg);
    }
    if(mi->dwFlags & MOUSEEVENTF_RIGHTDOWN)
    {
-      QueueKeyStateTable[VK_RBUTTON] |= 0xc0;
+      gQueueKeyStateTable[VK_RBUTTON] |= 0xc0;
       Msg.message = SwapBtnMsg[0][!SwapButtons];
       CurInfo->ButtonsDown |= SwapBtn[!SwapButtons];
       MsqInsertSystemMessage(&Msg);
    }
    else if(mi->dwFlags & MOUSEEVENTF_RIGHTUP)
    {
-      QueueKeyStateTable[VK_RBUTTON] &= ~0x80;
+      gQueueKeyStateTable[VK_RBUTTON] &= ~0x80;
       Msg.message = SwapBtnMsg[1][!SwapButtons];
       CurInfo->ButtonsDown &= ~SwapBtn[!SwapButtons];
       MsqInsertSystemMessage(&Msg);
@@ -1079,14 +1077,14 @@ IntMouseInput(MOUSEINPUT *mi)
       Msg.message = WM_XBUTTONDOWN;
       if(mi->mouseData & XBUTTON1)
       {
-         QueueKeyStateTable[VK_XBUTTON1] |= 0xc0;
+         gQueueKeyStateTable[VK_XBUTTON1] |= 0xc0;
          Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON1);
          CurInfo->ButtonsDown |= XBUTTON1;
          MsqInsertSystemMessage(&Msg);
       }
       if(mi->mouseData & XBUTTON2)
       {
-         QueueKeyStateTable[VK_XBUTTON2] |= 0xc0;
+         gQueueKeyStateTable[VK_XBUTTON2] |= 0xc0;
          Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON2);
          CurInfo->ButtonsDown |= XBUTTON2;
          MsqInsertSystemMessage(&Msg);
@@ -1097,14 +1095,14 @@ IntMouseInput(MOUSEINPUT *mi)
       Msg.message = WM_XBUTTONUP;
       if(mi->mouseData & XBUTTON1)
       {
-         QueueKeyStateTable[VK_XBUTTON1] &= ~0x80;
+         gQueueKeyStateTable[VK_XBUTTON1] &= ~0x80;
          Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON1);
          CurInfo->ButtonsDown &= ~XBUTTON1;
          MsqInsertSystemMessage(&Msg);
       }
       if(mi->mouseData & XBUTTON2)
       {
-         QueueKeyStateTable[VK_XBUTTON2] &= ~0x80;
+         gQueueKeyStateTable[VK_XBUTTON2] &= ~0x80;
          Msg.wParam = MAKEWPARAM(CurInfo->ButtonsDown, XBUTTON2);
          CurInfo->ButtonsDown &= ~XBUTTON2;
          MsqInsertSystemMessage(&Msg);