OverlayWndProc: Fix rendering issue, allow Esc to cancel

git-svn-id: svn://vcs.sdm.2ki.xyz/Grabby/trunk@11 27729192-006e-004d-b9b5-06fbd0ef7001
This commit is contained in:
snow flurry 2024-02-15 05:40:23 +00:00
parent cc5c051a33
commit d64803c1a9

View file

@ -187,7 +187,11 @@ OverlayWndProc(HWND hWnd,
(ptCur.y != ptStart.y)) (ptCur.y != ptStart.y))
{ {
RECT rcPrevDmg = POINT2RECT(ptStart, ptPrev); RECT rcPrevDmg = POINT2RECT(ptStart, ptPrev);
// InvalidateRect(hWnd, &rcCurDmg, TRUE); // Expand out a little bit to contain the focus rect
rcPrevDmg.left--;
rcPrevDmg.right++;
rcPrevDmg.top--;
rcPrevDmg.bottom++;
InvalidateRect(hWnd, &rcPrevDmg, TRUE); InvalidateRect(hWnd, &rcPrevDmg, TRUE);
} }
@ -211,8 +215,10 @@ OverlayWndProc(HWND hWnd,
} }
break; break;
case WM_KEYUP: case WM_KEYUP:
// TODO: Escape if (wParam != VK_ESCAPE) {
break; break;
}
/* PASSTHRU */
case WM_RBUTTONUP: case WM_RBUTTONUP:
// We treat right click as Escape // We treat right click as Escape
PostQuitMessage(1); PostQuitMessage(1);