cvsimport

This commit is contained in:
okan
2012-12-19 15:21:34 +00:00
14 changed files with 310 additions and 269 deletions

12
xutil.c
View File

@@ -422,11 +422,19 @@ xu_getcolor(struct screen_ctx *sc, char *name)
{
XColor color, tmp;
if (!XAllocNamedColor(X_Dpy, DefaultColormap(X_Dpy, sc->which),
name, &color, &tmp)) {
if (!XAllocNamedColor(X_Dpy, sc->colormap, name, &color, &tmp)) {
warnx("XAllocNamedColor error: '%s'", name);
return (0);
}
return (color.pixel);
}
void
xu_xorcolor(XRenderColor a, XRenderColor b, XRenderColor *r)
{
r->red = a.red ^ b.red;
r->green = a.green ^ b.green;
r->blue = a.blue ^ b.blue;
r->alpha = 0xffff;
}