# include "Ximage.h"

/************** SetNormalHints  *************/
void
SetNormalHints (graphic)
Graphic         graphic[];
{

  XSizeHints *sizehints;

  sizehints = XAllocSizeHints ();

  if (sizehints != (XSizeHints *) NULL)  {
    sizehints[0].x = graphic[0].x;
    sizehints[0].y = graphic[0].x;
    sizehints[0].width = graphic[0].dx;
    sizehints[0].height = graphic[0].dy;
    sizehints[0].min_width = MIN_WIDTH;
    sizehints[0].min_height = MIN_HEIGHT;    
    sizehints[0].flags = USPosition | USSize | PMinSize;

    sizehints[0].base_width = graphic[0].dx;
    sizehints[0].base_height = graphic[0].dy;
    sizehints[0].flags |= PBaseSize;
    
    XSetWMNormalHints (graphic[0].display, graphic[0].window, sizehints);
    XFree (sizehints);
  }
}

