[WIN32K]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 21 Apr 2010 15:15:57 +0000 (15:15 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 21 Apr 2010 15:15:57 +0000 (15:15 +0000)
Update text and background brush properly. Fixes wrong colors in radio buttons in Firefox. Fix by Jerome Gardou.

See issue #5311 for more details.

svn path=/trunk/; revision=46980

reactos/subsystems/win32/win32k/objects/dcobjs.c

index e35fa71..e18eb61 100644 (file)
@@ -110,6 +110,9 @@ DC_vUpdateTextBrush(PDC pdc)
 {
     PDC_ATTR pdcattr = pdc->pdcattr;
 
+    if(pdcattr->ulDirty_ & DIRTY_TEXT)
+        EBRUSHOBJ_vUpdate(&pdc->eboText, pdc->eboText.pbrush, pdc);
+
     /* Update the eboText's solid color */
     EBRUSHOBJ_vSetSolidBrushColor(&pdc->eboText, pdcattr->crForegroundClr);
 
@@ -123,6 +126,9 @@ DC_vUpdateBackgroundBrush(PDC pdc)
 {
     PDC_ATTR pdcattr = pdc->pdcattr;
 
+    if(pdcattr->ulDirty_ & DIRTY_BACKGROUND)
+        EBRUSHOBJ_vUpdate(&pdc->eboBackground, pdc->eboBackground.pbrush, pdc);
+
     /* Update the eboBackground's solid color */
     EBRUSHOBJ_vSetSolidBrushColor(&pdc->eboBackground, pdcattr->crBackgroundClr);