regedit: Properly handle negative coordinates for mouse events.
This commit is contained in:
parent
4a464ef03a
commit
5b875279d1
|
@ -245,7 +245,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
break;
|
break;
|
||||||
case WM_LBUTTONDOWN: {
|
case WM_LBUTTONDOWN: {
|
||||||
RECT rt;
|
RECT rt;
|
||||||
int x = LOWORD(lParam);
|
int x = (short)LOWORD(lParam);
|
||||||
GetClientRect(hWnd, &rt);
|
GetClientRect(hWnd, &rt);
|
||||||
if (x>=pChildWnd->nSplitPos-SPLIT_WIDTH/2 && x<pChildWnd->nSplitPos+SPLIT_WIDTH/2+1) {
|
if (x>=pChildWnd->nSplitPos-SPLIT_WIDTH/2 && x<pChildWnd->nSplitPos+SPLIT_WIDTH/2+1) {
|
||||||
last_split = pChildWnd->nSplitPos;
|
last_split = pChildWnd->nSplitPos;
|
||||||
|
|
Loading…
Reference in New Issue