Fix for bug 640 - moving thin frames leaves mess

Alexandre Julliard julliard at
Sat Sep 27 15:48:37 CDT 2003

Pavel Roskin <proski at> writes:

> I've retested paintbrush on the 8-but display and I see no difference.
> The reasons are:
> 1) I invested time into testing XOR operations on Windows 2000 and found
> no magic interpretation for the black pen.  It's invisible in Windows.

Well yes, that's the point, it's invisible so apps are not going to
use it. On Windows black is always pixel 0, so xoring with black never
does anything; if you want to invert an area you have to use white. On
X, sometimes white is pixel 0, so you'd have to use black to invert;
but of course Windows apps don't do that, which is why we have that

> 2) DrawFocusRect() is Wine uses this hack accidentally.  COLOR_WINDOWTEXT
> is black, so it becomes white.  It's confusing.  Not only window text is
> irrelevant, but Wine also gets it as black but uses as white.

That's a bug, but the bug is not that XOR changes black to white, the
bug is using black with XOR in the first place (which is what your
other change is correctly fixing).

> 3) Black pen, white background, pattern, opaque mode.  The background
> would still be changing the image.  If we consider the pen white, the
> pattern would be lost.  I actually didn't test it, but I expect it to be
> broken.

I don't see how a XOR with 0 would ever change anything.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list