[ui] update progress bar position for screen readers

* Make sure to call the original winproc on PBM_SETPOS and friends.
* Closes #1289
This commit is contained in:
Pete Batard 2019-06-14 13:02:35 +01:00
parent 861f51169e
commit 24e8307d9a
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
2 changed files with 8 additions and 5 deletions

View file

@ -888,6 +888,7 @@ static INT_PTR CALLBACK ProgressCallback(HWND hCtrl, UINT message, WPARAM wParam
return (INT_PTR)TRUE;
case PBM_SETRANGE:
CallWindowProc(progress_original_proc, hCtrl, message, wParam, lParam);
// Don't bother sanity checking min and max: If *you* want to
// be an ass about the progress bar range, it's *your* problem.
min = (uint32_t)(lParam & 0xFFFF);
@ -895,11 +896,13 @@ static INT_PTR CALLBACK ProgressCallback(HWND hCtrl, UINT message, WPARAM wParam
return (INT_PTR)TRUE;
case PBM_SETPOS:
CallWindowProc(progress_original_proc, hCtrl, message, wParam, lParam);
pos = (WORD)wParam;
InvalidateRect(hProgress, NULL, TRUE);
return (INT_PTR)TRUE;
case PBM_SETMARQUEE:
CallWindowProc(progress_original_proc, hCtrl, message, wParam, lParam);
if ((wParam == TRUE) && (!marquee_mode)) {
marquee_mode = TRUE;
pos = min;