https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1e05f9cc32dda973acc1e46ecbad793d1187b238

commit 1e05f9cc32dda973acc1e46ecbad793d1187b238
Author:     Joachim Henze <[email protected]>
AuthorDate: Tue Jan 29 19:25:57 2019 +0100
Commit:     Joachim Henze <[email protected]>
CommitDate: Tue Jan 29 19:25:57 2019 +0100

    [COMCTL32] Revert "button: Don't erase the area of the checkbox or the 
text."
    
    This reverts commit 0.4.12-dev-347-g
    75a80ec82309a19632251bfe6aa9e7f14132a86f
    by explcit request of Giannis Adamopoulos.
    
    I double-checked and confirm, that
    this revert fixes both regressions CORE-15595 & CORE-15696.
    On the downside the revert will intensify again the regression CORE-13278
    (will make the text flash again as well).
    
    Giannis Adamopoulos mentioned earlier, that using double-buffering
    eventually could be a valid way out of CORE-13278 instead.
---
 dll/win32/comctl32/button.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/dll/win32/comctl32/button.c b/dll/win32/comctl32/button.c
index 602a37c7a7..59067471f1 100644
--- a/dll/win32/comctl32/button.c
+++ b/dll/win32/comctl32/button.c
@@ -1550,9 +1550,7 @@ static void CB_Paint( const BUTTON_INFO *infoPtr, HDC 
hDC, UINT action )
 
     /* Since WM_ERASEBKGND does nothing, first prepare background */
     if (action == ODA_SELECT) FillRect( hDC, &rbox, hBrush );
-#ifndef __REACTOS__
     if (action == ODA_DRAWENTIRE) FillRect( hDC, &client, hBrush );
-#endif
 
     /* Draw label */
     client = rtext;
@@ -1618,15 +1616,6 @@ static void CB_Paint( const BUTTON_INFO *infoPtr, HDC 
hDC, UINT action )
     if (action == ODA_DRAWENTIRE)
         BUTTON_DrawLabel(infoPtr, hDC, dtFlags, &rtext);
 
-#ifdef __REACTOS__
-    if (action == ODA_DRAWENTIRE)
-    {
-        ExcludeClipRect(hDC, rbox.left, rbox.top, rbox.right, rbox.bottom);
-        ExcludeClipRect(hDC, rtext.left, rtext.top + 1, rtext.right, 
rtext.bottom - 1);
-        FillRect( hDC, &client, hBrush );
-    }
-#endif
-
     /* ... and focus */
     if (action == ODA_FOCUS || (state & BST_FOCUS))
     {

Reply via email to