Commit 549f7c91 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent 635544e2
...@@ -2300,7 +2300,8 @@ static LONG start_size_move( HWND hwnd, WPARAM wParam, POINT *capturePoint, LONG ...@@ -2300,7 +2300,8 @@ static LONG start_size_move( HWND hwnd, WPARAM wParam, POINT *capturePoint, LONG
switch(msg.message) switch(msg.message)
{ {
case WM_MOUSEMOVE: 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 ) ); hittest = SendMessageW( hwnd, WM_NCHITTEST, 0, MAKELONG( pt.x, pt.y ) );
if ((hittest < HTLEFT) || (hittest > HTBOTTOMRIGHT)) hittest = 0; if ((hittest < HTLEFT) || (hittest > HTBOTTOMRIGHT)) hittest = 0;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment