Author: jimtabor
Date: Sun Aug 30 23:15:55 2015
New Revision: 68876
URL:
http://svn.reactos.org/svn/reactos?rev=68876&view=rev
Log:
[NtGdi]
- Fix color setting.
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] Sun Aug 30 23:15:55 2015
@@ -159,9 +159,15 @@
}
pdcattr = pdc->pdcattr;
- // What about ulForegroundClr, like in gdi32?
- crOldColor = pdcattr->crForegroundClr;
- pdcattr->crForegroundClr = color;
+ crOldColor = (COLORREF) pdcattr->ulForegroundClr;
+ pdcattr->ulForegroundClr = (ULONG)color;
+
+ if (pdcattr->crForegroundClr != color)
+ {
+ pdcattr->ulDirty_ |= (DIRTY_TEXT|DIRTY_LINE|DIRTY_FILL);
+ pdcattr->crForegroundClr = color;
+ }
+
DC_vUpdateTextBrush(pdc);
DC_UnlockDc(pdc);