edit control patch

Dan Engel dengel at sourceharvest.com
Wed Apr 11 21:24:36 CDT 2001


This is my first attempt at submitting a patch--please someone let me know if there are "customs" I need to follow.

Problem: Edit boxes are, in some cases, displaying selected text as white-on-white, so that it disappeared.

Analysis: When text is drawn using the x11drv function X11DRV_ExtTextOut, the function does not paint a background rectangle if the background mode for the device context is transparent.  In the case of edit controls, there is no attempt to change the background mode to opaque for selected text.

Solution: In the case of painting reverse text in the edit control (function EDIT_PaintText) set the backgound mode to opaque, and then restore it before exiting the function.

The patch is attached (wine.diff).

-------------- next part --------------
Index: wine/controls/edit.c
===================================================================
RCS file: /home/wine/wine/controls/edit.c,v
retrieving revision 1.78
diff -r1.78 edit.c
2204a2205
> 	INT BkMode;
2208a2210
> 	BkMode = GetBkMode(dc);
2213a2216
> 		SetBkMode( dc, OPAQUE);
2229a2233
> 		SetBkMode( dc, BkMode);


More information about the wine-patches mailing list