From fc8f7a0075818b650f0a2f6b555159e796e1d130 Mon Sep 17 00:00:00 2001 From: Jonas Kümmerlin Date: Mon, 22 Jun 2020 16:34:47 +0200 Subject: fix oversight in fallback buffered paint implementation and make label use it more efficiently how the fuck was this not noticed before? --- alf/alflabel.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'alf/alflabel.cpp') diff --git a/alf/alflabel.cpp b/alf/alflabel.cpp index 0a47d58..4643c3f 100644 --- a/alf/alflabel.cpp +++ b/alf/alflabel.cpp @@ -222,12 +222,8 @@ ALF_Label_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); - RECT rcClient; - GetClientRect(hwnd, &rcClient); - RECT rcPaint = { 0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top }; - HDC hdcBuffer = NULL; - ALF_Compat_HPAINTBUFFER hpb = ALF_Compat_BeginBufferedPaint(hdc, &rcPaint, 0, NULL, &hdcBuffer); + ALF_Compat_HPAINTBUFFER hpb = ALF_Compat_BeginBufferedPaint(hdc, &ps.rcPaint, 0, NULL, &hdcBuffer); if (hpb) { ALF_Label_Paint(hwnd, priv, hdcBuffer, &ps.rcPaint); ALF_Compat_EndBufferedPaint(hpb, TRUE); -- cgit v1.2.3