Don't update the mouse button status in update_key_state, leave that

to the input processing.
This commit is contained in:
Alexandre Julliard 2002-08-16 01:43:41 +00:00
parent cc7042f9ec
commit a2302fbecf
1 changed files with 14 additions and 3 deletions

View File

@ -88,6 +88,19 @@ static void get_coords( HWND *hwnd, Window window, int x, int y, POINT *pt )
}
/***********************************************************************
* update_button_state
*
* Update the button state with what X provides us
*/
static void update_button_state( unsigned int state )
{
pKeyStateTable[VK_LBUTTON] = (state & Button1Mask ? 0x80 : 0);
pKeyStateTable[VK_MBUTTON] = (state & Button2Mask ? 0x80 : 0);
pKeyStateTable[VK_RBUTTON] = (state & Button3Mask ? 0x80 : 0);
}
/***********************************************************************
* update_key_state
*
@ -95,9 +108,6 @@ static void get_coords( HWND *hwnd, Window window, int x, int y, POINT *pt )
*/
static void update_key_state( unsigned int state )
{
pKeyStateTable[VK_LBUTTON] = (state & Button1Mask ? 0x80 : 0);
pKeyStateTable[VK_MBUTTON] = (state & Button2Mask ? 0x80 : 0);
pKeyStateTable[VK_RBUTTON] = (state & Button3Mask ? 0x80 : 0);
pKeyStateTable[VK_SHIFT] = (state & ShiftMask ? 0x80 : 0);
pKeyStateTable[VK_CONTROL] = (state & ControlMask ? 0x80 : 0);
}
@ -516,6 +526,7 @@ void X11DRV_GetCursorPos(LPPOINT pos)
return;
update_key_state( xstate );
update_button_state( xstate );
TRACE("pointer at (%d,%d)\n", winX, winY );
pos->x = winX;
pos->y = winY;