user32: Properly handle negative coordinates for mouse events.
This commit is contained in:
parent
ff068c088b
commit
7d8ef2e19e
|
@ -227,8 +227,8 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
|
|||
LONG state;
|
||||
HANDLE oldHbitmap;
|
||||
|
||||
pt.x = LOWORD(lParam);
|
||||
pt.y = HIWORD(lParam);
|
||||
pt.x = (short)LOWORD(lParam);
|
||||
pt.y = (short)HIWORD(lParam);
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
|
|
|
@ -1703,8 +1703,8 @@ static void COMBO_LButtonDown( LPHEADCOMBO lphc, LPARAM lParam )
|
|||
BOOL bButton;
|
||||
HWND hWnd = lphc->self;
|
||||
|
||||
pt.x = LOWORD(lParam);
|
||||
pt.y = HIWORD(lParam);
|
||||
pt.x = (short)LOWORD(lParam);
|
||||
pt.y = (short)HIWORD(lParam);
|
||||
bButton = PtInRect(&lphc->buttonRect, pt);
|
||||
|
||||
if( (CB_GETTYPE(lphc) == CBS_DROPDOWNLIST) ||
|
||||
|
@ -1780,8 +1780,8 @@ static void COMBO_MouseMove( LPHEADCOMBO lphc, WPARAM wParam, LPARAM lParam )
|
|||
POINT pt;
|
||||
RECT lbRect;
|
||||
|
||||
pt.x = LOWORD(lParam);
|
||||
pt.y = HIWORD(lParam);
|
||||
pt.x = (short)LOWORD(lParam);
|
||||
pt.y = (short)HIWORD(lParam);
|
||||
|
||||
if( lphc->wState & CBF_BUTTONDOWN )
|
||||
{
|
||||
|
|
|
@ -2732,8 +2732,8 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
|
|||
POINT pt;
|
||||
RECT rect;
|
||||
|
||||
pt.x = LOWORD(lParam);
|
||||
pt.y = HIWORD(lParam);
|
||||
pt.x = (short)LOWORD(lParam);
|
||||
pt.y = (short)HIWORD(lParam);
|
||||
rect.left = 0;
|
||||
rect.top = 0;
|
||||
rect.right = descr->width;
|
||||
|
|
|
@ -1771,7 +1771,7 @@ static BOOL MENU_ShowPopup( HWND hwndOwner, HMENU hmenu, UINT id,
|
|||
INT x, INT y, INT xanchor, INT yanchor )
|
||||
{
|
||||
POPUPMENU *menu;
|
||||
UINT width, height;
|
||||
INT width, height;
|
||||
POINT pt;
|
||||
HMONITOR monitor;
|
||||
MONITORINFO info;
|
||||
|
|
|
@ -2785,8 +2785,8 @@ BOOL WINAPI PeekMessageW( MSG *msg_out, HWND hwnd, UINT first, UINT last, UINT f
|
|||
}
|
||||
|
||||
thread_info->GetMessageTimeVal = msg.time;
|
||||
msg.pt.x = LOWORD( thread_info->GetMessagePosVal );
|
||||
msg.pt.y = HIWORD( thread_info->GetMessagePosVal );
|
||||
msg.pt.x = (short)LOWORD( thread_info->GetMessagePosVal );
|
||||
msg.pt.y = (short)HIWORD( thread_info->GetMessagePosVal );
|
||||
|
||||
HOOK_CallHooks( WH_GETMESSAGE, HC_ACTION, flags & PM_REMOVE, (LPARAM)&msg, TRUE );
|
||||
|
||||
|
|
|
@ -3023,8 +3023,8 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT pt )
|
|||
if( msg.message == WM_MOUSEMOVE )
|
||||
{
|
||||
POINT tmp;
|
||||
tmp.x = LOWORD(msg.lParam);
|
||||
tmp.y = HIWORD(msg.lParam);
|
||||
tmp.x = (short)LOWORD(msg.lParam);
|
||||
tmp.y = (short)HIWORD(msg.lParam);
|
||||
if( !PtInRect( &rect, tmp ))
|
||||
{
|
||||
ReleaseCapture();
|
||||
|
|
Loading…
Reference in New Issue