optimize the refresh of scrolled

This commit is contained in:
Vincent Wei
2022-11-07 20:23:57 +08:00
parent 9b89614569
commit b66ef7a2f5
2 changed files with 4 additions and 2 deletions

View File

@@ -172,6 +172,10 @@ BOOL scrolled_set_cont_pos (HWND hWnd, PSCRDATA pscrdata, int cont_x, int cont_y
SetScrollPos (hWnd, SB_VERT, cont_y);
bChange = TRUE;
}
if (bChange)
UpdateInvalidClient(hWnd, FALSE);
return bChange;
}

View File

@@ -250,8 +250,6 @@ static inline void scrolled_refresh_view (PSCRDATA pscrdata)
rcMargin.right = rcClient.right;
InvalidateRect (pscrdata->hSV, &rcMargin, TRUE);
}
UpdateInvalidClient(pscrdata->hSV, TRUE);
}
/* ------------------------------------------------------------------------- */