stash the default screen visual and colormap in screen_ctx

This commit is contained in:
okan
2012-12-17 18:34:06 +00:00
parent 82e8ec4245
commit af13c08108
4 changed files with 10 additions and 9 deletions

View File

@@ -422,8 +422,7 @@ 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);
}