- ncolors = get_integer_resource ("colors", "Integer");
- if (ncolors <= 0) ncolors = 128;
- colors = (XColor *) malloc ((ncolors+1) * sizeof (*colors));
- make_smooth_colormap (dpy, xgwa.visual, xgwa.colormap, colors, &ncolors,
+ st->ncolors = get_integer_resource (st->dpy, "colors", "Integer");
+ if (st->ncolors <= 0) st->ncolors = 128;
+ st->colors = (XColor *) malloc ((st->ncolors+1) * sizeof (*st->colors));
+ make_smooth_colormap (xgwa.screen, xgwa.visual, xgwa.colormap,
+ st->colors, &st->ncolors,