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:
parent
cc5c051a33
commit
d64803c1a9
10
Overlay.c
10
Overlay.c
|
@ -187,7 +187,11 @@ OverlayWndProc(HWND hWnd,
|
|||
(ptCur.y != ptStart.y))
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -211,8 +215,10 @@ OverlayWndProc(HWND hWnd,
|
|||
}
|
||||
break;
|
||||
case WM_KEYUP:
|
||||
// TODO: Escape
|
||||
if (wParam != VK_ESCAPE) {
|
||||
break;
|
||||
}
|
||||
/* PASSTHRU */
|
||||
case WM_RBUTTONUP:
|
||||
// We treat right click as Escape
|
||||
PostQuitMessage(1);
|
||||
|
|
Loading…
Reference in a new issue