mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-02-06 10:21:57 +08:00
fix a bug of GetUpdateRect: intersect bouding rectangle of invalid region with client rect
This commit is contained in:
@@ -5585,11 +5585,13 @@ BOOL GUIAPI ValidateRegion (HWND hWnd, const CLIPRGN* pRgn)
|
||||
BOOL GUIAPI GetUpdateRect (HWND hWnd, RECT* update_rect)
|
||||
{
|
||||
PMAINWIN pWin;
|
||||
RECT rcClient;
|
||||
|
||||
MG_CHECK_RET (MG_IS_NORMAL_WINDOW(hWnd), FALSE);
|
||||
pWin = MG_GET_WINDOW_PTR (hWnd);
|
||||
|
||||
*update_rect = pWin->InvRgn.rgn.rcBound;
|
||||
GetClientRect(hWnd, &rcClient);
|
||||
IntersectRect(update_rect, &pWin->InvRgn.rgn.rcBound, &rcClient);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user