Re: [dev] Xft patch dwm 6.0
Because I'm a doofus : ) Damn that Xft documentation! If I only knew
XftColorAllocName existed, uuuuuhhhhhhhhhgggggg. Thanks David! I'm almost
certain from looking at that, that it will fix my problem. And yea I'm
aware of the XSetForegroundColor, : ) Thanks a bunch!
On Tue, May 15, 2012 at 9:34 PM, David Dufberg Töttrup <david_AT_dufberg.se>wrote:
> On May 15 2012, Lee F. wrote:
>
>> There is one bug. For some reason, The colors for the font are affected by
>> the previous color 'parsed' by XAllocNamedColor. If someone could check
>> out
>> getcolor() and figure what is wrong, that'd be great. I'd really like to
>> make this patch *perfect* before throwing it up on suckless.
>>
> Don't know why you do the converting thingie. Why not use
> XftColorAllocName?
> Like this (untested, but similar works in a program I wrote):
> XftColor getcolor(const char *colstr) {
> XftColor color;
>
> if(!XftColorAllocName(dpy, visual, cmap, colstr, &color))
> die("error, cannot allocate color '%s'\n", colstr);
>
> return color;
> }
>
>
> Also you don't need to XSetForeground before XftDrawStringUtf8 in drawtext.
>
>
> David
>
>
Received on Wed May 16 2012 - 03:37:14 CEST
This archive was generated by hypermail 2.3.0
: Wed May 16 2012 - 03:48:03 CEST