Add color cursor support

Duane Clark dclark at akamail.com
Wed Dec 19 19:47:28 CST 2001


Alexandre Julliard wrote:

> Duane Clark <dclark at leewardfpga.com> writes:
> 
> 
>>The main ugly hack that is performed here is in determining whether a
>>pixel is a foreground or background pixel. This is done by adding the
>>red, green and blue values for each pixel, and testing whether they
>>exceed an arbitrary threshold. This should probably be a reasonably
>>safe method, since presumably any cursor will have a high level of
>>contrast between foreground and background colors.
>>
> 
> It's reasonable, but you should be doing this locally in the X image
> before transferring it to the server; painting the pixmap in the
> server pixel by pixel is going to be quite slow. And you may want to
> have a look at CURSORICON_IconToCursor, it does something similar.

Okay, I'll take a look at that, and do the painting locally. I did not
really consider speed to be an issue since these are small pixmaps and
the function is only called when a cursor is changed. On a 1G Athlon it
appears to change instantly, but I'll take it easy on others.





More information about the wine-devel mailing list