+ if(style.visualClass==PseudoColor || style.visualClass==StaticColor)
+ {
+ XStoreColors(style.display, style.colormap, colors, j );
+ }
+ else if(style.visualClass==TrueColor || style.visualClass==DirectColor)
+ {
+ static unsigned long pixels[4];
+ static int count=0;
+
+ if(count){
+ XFreeColors(style.display,style.colormap,pixels,count,0);
+ count=0;
+ }
+
+ if(XAllocColor(style.display,style.colormap,&edit.color_set->fg))
+ pixels[count++]=edit.color_set->fg.pixel;
+ if(XAllocColor(style.display,style.colormap,&edit.color_set->bg))
+ pixels[count++]=edit.color_set->bg.pixel;
+ if(XAllocColor(style.display,style.colormap,&edit.color_set->ts))
+ pixels[count++]=edit.color_set->ts.pixel;
+ if(XAllocColor(style.display,style.colormap,&edit.color_set->bs))
+ pixels[count++]=edit.color_set->bs.pixel;
+
+ XtVaSetValues(edit.newButton,
+ XmNbackground,edit.color_set->bg.pixel,
+ XmNarmColor,edit.color_set->bg.pixel,
+ XmNforeground,edit.color_set->fg.pixel,
+ XmNtopShadowColor,edit.color_set->ts.pixel,
+ XmNbottomShadowColor,edit.color_set->bs.pixel,NULL);
+ }