user32: Avoid recalculating the non-client hit-test value for NC_HandleNCMouseMove().
The wParam in WM_NCMOUSEMOVE messages already contains the non-client hit-test value. Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f8adbf35ca
commit
2e81e5779d
|
@ -171,7 +171,7 @@ extern LRESULT NC_HandleNCActivate( HWND hwnd, WPARAM wParam, LPARAM lParam ) DE
|
|||
extern LRESULT NC_HandleNCCalcSize( HWND hwnd, WPARAM wParam, RECT *winRect ) DECLSPEC_HIDDEN;
|
||||
extern LRESULT NC_HandleNCHitTest( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
|
||||
extern LRESULT NC_HandleNCLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
|
||||
extern LRESULT NC_HandleNCMouseMove( HWND hwnd, POINT pt ) DECLSPEC_HIDDEN;
|
||||
extern LRESULT NC_HandleNCMouseMove( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
|
||||
extern LRESULT NC_HandleNCMouseLeave( HWND hwnd ) DECLSPEC_HIDDEN;
|
||||
extern LRESULT NC_HandleNCRButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam ) DECLSPEC_HIDDEN;
|
||||
extern LRESULT NC_HandleNCLButtonDblClk( HWND hwnd, WPARAM wParam, LPARAM lParam) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -246,12 +246,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
|
|||
return NC_HandleNCPaint( hwnd, (HRGN)wParam );
|
||||
|
||||
case WM_NCMOUSEMOVE:
|
||||
{
|
||||
POINT pt;
|
||||
pt.x = (short)LOWORD(lParam);
|
||||
pt.y = (short)HIWORD(lParam);
|
||||
return NC_HandleNCMouseMove( hwnd, pt );
|
||||
}
|
||||
return NC_HandleNCMouseMove( hwnd, wParam, lParam );
|
||||
|
||||
case WM_NCMOUSELEAVE:
|
||||
return NC_HandleNCMouseLeave( hwnd );
|
||||
|
|
|
@ -635,22 +635,24 @@ LRESULT NC_HandleNCHitTest( HWND hwnd, POINT pt )
|
|||
return HTNOWHERE;
|
||||
}
|
||||
|
||||
LRESULT NC_HandleNCMouseMove(HWND hwnd, POINT pt)
|
||||
LRESULT NC_HandleNCMouseMove(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
LONG hittest;
|
||||
RECT rect;
|
||||
POINT pt;
|
||||
|
||||
TRACE("hwnd=%p pt=%s\n", hwnd, wine_dbgstr_point(&pt));
|
||||
TRACE("hwnd=%p wparam=%#lx lparam=%#lx\n", hwnd, wParam, lParam);
|
||||
|
||||
hittest = NC_HandleNCHitTest(hwnd, pt);
|
||||
if (hittest != HTHSCROLL && hittest != HTVSCROLL)
|
||||
if (wParam != HTHSCROLL && wParam != HTVSCROLL)
|
||||
return 0;
|
||||
|
||||
WIN_GetRectangles(hwnd, COORDS_CLIENT, &rect, NULL);
|
||||
|
||||
pt.x = (short)LOWORD(lParam);
|
||||
pt.y = (short)HIWORD(lParam);
|
||||
ScreenToClient(hwnd, &pt);
|
||||
pt.x -= rect.left;
|
||||
pt.y -= rect.top;
|
||||
SCROLL_HandleScrollEvent(hwnd, hittest == HTHSCROLL ? SB_HORZ : SB_VERT, WM_NCMOUSEMOVE, pt);
|
||||
SCROLL_HandleScrollEvent(hwnd, wParam == HTHSCROLL ? SB_HORZ : SB_VERT, WM_NCMOUSEMOVE, pt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue