Alexandre Julliard : user32: Clamp the mouse position to the window rectangle when starting a window resize .

Alexandre Julliard julliard at winehq.org
Mon Mar 24 15:21:41 CDT 2008


Module: wine
Branch: master
Commit: 549f7c91b40ab1bd908ce1fcb841d346abb78028
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=549f7c91b40ab1bd908ce1fcb841d346abb78028

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Mar 24 18:01:02 2008 +0100

user32: Clamp the mouse position to the window rectangle when starting a window resize.

---

 dlls/user32/winpos.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index 35ac5b0..04377b9 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -2300,7 +2300,8 @@ static LONG start_size_move( HWND hwnd, WPARAM wParam, POINT *capturePoint, LONG
             switch(msg.message)
             {
             case WM_MOUSEMOVE:
-                pt = msg.pt;
+                pt.x = min( max( msg.pt.x, rectWindow.left ), rectWindow.right - 1 );
+                pt.y = min( max( msg.pt.y, rectWindow.top ), rectWindow.bottom - 1 );
                 hittest = SendMessageW( hwnd, WM_NCHITTEST, 0, MAKELONG( pt.x, pt.y ) );
                 if ((hittest < HTLEFT) || (hittest > HTBOTTOMRIGHT)) hittest = 0;
                 break;




More information about the wine-cvs mailing list