mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-14 19:55:40 +00:00
Don't update the mouse button status in update_key_state, leave that
to the input processing.
This commit is contained in:
parent
cc7042f9ec
commit
a2302fbecf
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue