# include "Ximage.h"

/************** NameWindow *************/
void NameWindow (Graphic *graphic, char *name) {

  char       *class_name;
  char       *class_type;
  XClassHint *classhints;

  class_type = class_name = name;

  classhints = XAllocClassHint ();

  if (classhints != (XClassHint *) NULL)  {
    classhints[0].res_name = class_name;
    classhints[0].res_class = class_type;
    XSetClassHint (graphic[0].display, graphic[0].window, classhints);
    XFree (classhints);
  }
  
  XStoreName (graphic[0].display, graphic[0].window, name);
  XSetIconName (graphic[0].display, graphic[0].window, name);
}
