Author: jimtabor Date: Fri Jul 15 20:13:33 2016 New Revision: 71946
URL: http://svn.reactos.org/svn/reactos?rev=71946&view=rev Log: [NtGdi] - Make SetBkColor work the same as client side.
Modified: trunk/reactos/win32ss/gdi/ntgdi/dcutil.c
Modified: trunk/reactos/win32ss/gdi/ntgdi/dcutil.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dcutil.c?... ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/dcutil.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/dcutil.c [iso-8859-1] Fri Jul 15 20:13:33 2016 @@ -105,10 +105,15 @@ 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 @@ }
DC_vUpdateTextBrush(pdc); +// DC_vUpdateLineBrush(pdc); +// DC_vUpdateFillBrush(pdc);
DC_UnlockDc(pdc);