Alexandre Julliard : user32:
Properly handle negative coordinates for mouse events.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Oct 25 13:29:07 CDT 2006
Module: wine
Branch: master
Commit: 7d8ef2e19e8f1d5d6143c5e3969481180d7016ca
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7d8ef2e19e8f1d5d6143c5e3969481180d7016ca
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Oct 25 17:42:42 2006 +0200
user32: Properly handle negative coordinates for mouse events.
---
dlls/user/button.c | 4 ++--
dlls/user/combo.c | 8 ++++----
dlls/user/listbox.c | 4 ++--
dlls/user/menu.c | 2 +-
dlls/user/message.c | 4 ++--
dlls/user/win.c | 4 ++--
6 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/dlls/user/button.c b/dlls/user/button.c
index c10be0f..b42aa0c 100644
--- a/dlls/user/button.c
+++ b/dlls/user/button.c
@@ -227,8 +227,8 @@ static LRESULT WINAPI ButtonWndProc_comm
LONG state;
HANDLE oldHbitmap;
- pt.x = LOWORD(lParam);
- pt.y = HIWORD(lParam);
+ pt.x = (short)LOWORD(lParam);
+ pt.y = (short)HIWORD(lParam);
switch (uMsg)
{
diff --git a/dlls/user/combo.c b/dlls/user/combo.c
index c2c49bb..a2c7209 100644
--- a/dlls/user/combo.c
+++ b/dlls/user/combo.c
@@ -1703,8 +1703,8 @@ static void COMBO_LButtonDown( LPHEADCOM
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
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 )
{
diff --git a/dlls/user/listbox.c b/dlls/user/listbox.c
index 701e91b..ae9a8e3 100644
--- a/dlls/user/listbox.c
+++ b/dlls/user/listbox.c
@@ -2732,8 +2732,8 @@ static LRESULT WINAPI ListBoxWndProc_com
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;
diff --git a/dlls/user/menu.c b/dlls/user/menu.c
index e157e04..43bb11e 100644
--- a/dlls/user/menu.c
+++ b/dlls/user/menu.c
@@ -1771,7 +1771,7 @@ static BOOL MENU_ShowPopup( HWND hwndOwn
INT x, INT y, INT xanchor, INT yanchor )
{
POPUPMENU *menu;
- UINT width, height;
+ INT width, height;
POINT pt;
HMONITOR monitor;
MONITORINFO info;
diff --git a/dlls/user/message.c b/dlls/user/message.c
index b92951c..df3dcd4 100644
--- a/dlls/user/message.c
+++ b/dlls/user/message.c
@@ -2785,8 +2785,8 @@ BOOL WINAPI PeekMessageW( MSG *msg_out,
}
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 );
diff --git a/dlls/user/win.c b/dlls/user/win.c
index 1c3d9e4..6eac41c 100644
--- a/dlls/user/win.c
+++ b/dlls/user/win.c
@@ -3023,8 +3023,8 @@ BOOL WINAPI DragDetect( HWND hWnd, POINT
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();
More information about the wine-cvs
mailing list