[COMCTL32] Revert "button: Don't erase the area of the checkbox or the text."
authorJoachim Henze <Joachim.Henze@reactos.org>
Tue, 29 Jan 2019 18:25:57 +0000 (19:25 +0100)
committerJoachim Henze <Joachim.Henze@reactos.org>
Tue, 29 Jan 2019 18:25:57 +0000 (19:25 +0100)
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

index 602a37c..5906747 100644 (file)
@@ -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 );
 
     /* 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 );
     if (action == ODA_DRAWENTIRE) FillRect( hDC, &client, hBrush );
-#endif
 
     /* Draw label */
     client = rtext;
 
     /* 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);
 
     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))
     {
     /* ... and focus */
     if (action == ODA_FOCUS || (state & BST_FOCUS))
     {