From 0d440c625d45443c100b1dc517dcbf97bf82c04d Mon Sep 17 00:00:00 2001 From: James Tabor Date: Fri, 15 Jul 2016 20:13:33 +0000 Subject: [PATCH] [NtGdi] - Make SetBkColor work the same as client side. svn path=/trunk/; revision=71946 --- reactos/win32ss/gdi/ntgdi/dcutil.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/reactos/win32ss/gdi/ntgdi/dcutil.c b/reactos/win32ss/gdi/ntgdi/dcutil.c index 70b31c433c3..7aa924c6a66 100644 --- a/reactos/win32ss/gdi/ntgdi/dcutil.c +++ b/reactos/win32ss/gdi/ntgdi/dcutil.c @@ -105,10 +105,15 @@ IntGdiSetBkColor(HDC hDC, COLORREF color) return CLR_INVALID; } pdcattr = dc->pdcattr; - oldColor = pdcattr->crBackgroundClr; - pdcattr->crBackgroundClr = color; - pdcattr->ulBackgroundClr = (ULONG)color; - pdcattr->ulDirty_ |= DIRTY_BACKGROUND|DIRTY_LINE|DIRTY_FILL; // Clear Flag if set. + + oldColor = pdcattr->ulBackgroundClr; + pdcattr->ulBackgroundClr = color; + + if (pdcattr->crBackgroundClr != color) + { + pdcattr->ulDirty_ |= (DIRTY_BACKGROUND|DIRTY_LINE|DIRTY_FILL); // Clear Flag if set. + pdcattr->crBackgroundClr = color; + } hBrush = pdcattr->hbrush; DC_UnlockDc(dc); NtGdiSelectBrush(hDC, hBrush); @@ -184,6 +189,8 @@ IntGdiSetTextColor(HDC hDC, } DC_vUpdateTextBrush(pdc); +// DC_vUpdateLineBrush(pdc); +// DC_vUpdateFillBrush(pdc); DC_UnlockDc(pdc); -- 2.17.1