Call SyncUpdate in ReleaseDC instead of EndPaint

This commit is contained in:
Vincent Wei
2020-02-27 10:38:05 +08:00
parent 366bbb1ff0
commit 98cdfd9bfb
2 changed files with 5 additions and 15 deletions
-8
View File
@@ -5744,11 +5744,8 @@ HDC GUIAPI BeginPaint (HWND hWnd)
return hdc;
}
/* Since 5.0.0
Call SyncUpdateDC only in EndPaint can eliminate flickers effectively. */
void GUIAPI EndPaint (HWND hWnd, HDC hdc)
{
BOOL synced = FALSE;
PMAINWIN pWin;
MG_CHECK (MG_IS_NORMAL_WINDOW(hWnd));
@@ -5762,8 +5759,6 @@ void GUIAPI EndPaint (HWND hWnd, HDC hdc)
__mg_update_secondary_dc (pWin, hdc, real_dc,
&pWin->pMainWin->update_rc, HT_CLIENT);
ReleaseDC (real_dc);
SyncUpdateDC (real_dc);
synced = TRUE;
}
}
@@ -5793,9 +5788,6 @@ void GUIAPI EndPaint (HWND hWnd, HDC hdc)
ShowCaretEx (hWnd, FALSE);
}
#endif
if (!synced)
SyncUpdateDC (hdc);
}
BOOL RegisterWindowClass (PWNDCLASS pWndClass)