From f35d68907ba49f999945e420f43a237e6502bbb0 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 5 May 2015 14:44:10 -0400 Subject: [PATCH] More flicker work and TODOs. --- windows/container.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/windows/container.c b/windows/container.c index 60166811..69ccc360 100644 --- a/windows/container.c +++ b/windows/container.c @@ -65,6 +65,7 @@ static HBRUSH getControlBackgroundBrush(HWND hwnd, HDC dc, RECT *hwndScreenRect) return brush; } +// TODO this doesn't work right for partial redraws static void paintContainerBackground(HWND hwnd, HDC dc, RECT *paintRect) { RECT screenRect; @@ -208,6 +209,10 @@ static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP logLastError("error getting client rect in containerWndProc()"); paintContainerBackground(c->hwnd, (HDC) wParam, &r); return 0; + case WM_ERASEBKGND: + // avoid some flicker + // we draw the whole update area anyway + return 1; case WM_WINDOWPOSCHANGED: if ((wp->flags & SWP_NOSIZE) != 0) break;