# include "Ximage.h"

/************** NameWindow *************/
void
NameWindow (graphic, Name)
Graphic     graphic[];
char       *Name;
{

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

  name = strrchr (Name, '/');
  if (name != NULL) 
    name ++;
  else 
    name = Name;
  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);
}

