|  | Does it work on a Black and White system?
I had problem where I wasn't creating a pixmap of the right depth.  Here is the
routine I use now: Note I don't thinks this works on a Multihead system but
the fix should be trivial for that.
Neal
#define calc_width 32
#define calc_height 32
static char calc_bits[] = {
   0x00ff, 0x00ff, 0x00ff, 0x00ff, 0x0001, 0x0000, 0x0000, 0x0080,
   0x0001, 0x0000, 0x0000, 0x0080, 0x0081, 0x0001, 0x0000, 0x0080,
   0x0081, 0x0001, 0x0000, 0x0080, 0x0081, 0x0001, 0x0000, 0x0080,
   0x0081, 0x0001, 0x0000, 0x0080, 0x00f9, 0x001f, 0x00fe, 0x0087,
   0x00f9, 0x001f, 0x00fe, 0x0087, 0x0081, 0x0001, 0x0000, 0x0080,
   0x0081, 0x0001, 0x0000, 0x0080, 0x0081, 0x0001, 0x0000, 0x0080,
   0x0081, 0x0001, 0x0000, 0x0080, 0x0001, 0x0000, 0x0000, 0x0080,
   0x0001, 0x0000, 0x0000, 0x0080, 0x0001, 0x0000, 0x0000, 0x0080,
   0x0001, 0x0000, 0x0000, 0x0080, 0x0081, 0x0001, 0x0006, 0x0086,
   0x0081, 0x0001, 0x000e, 0x0087, 0x0001, 0x0000, 0x009c, 0x0083,
   0x0001, 0x0000, 0x00f8, 0x0081, 0x00f9, 0x001f, 0x00f0, 0x0080,
   0x00f9, 0x001f, 0x00f0, 0x0080, 0x0001, 0x0000, 0x00f8, 0x0081,
   0x0001, 0x0000, 0x009c, 0x0083, 0x0081, 0x0001, 0x000e, 0x0087,
   0x0081, 0x0001, 0x0006, 0x0086, 0x0001, 0x0000, 0x0000, 0x0080,
   0x0001, 0x0000, 0x0000, 0x0080, 0x0001, 0x0000, 0x0000, 0x0080,
   0x0001, 0x0000, 0x0000, 0x0080, 0x00ff, 0x00ff, 0x00ff, 0x00ff};
#define sm_calc_width 17
#define sm_calc_height 17
static char sm_calc_bits[] = {
   0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x02, 0x80, 0x00, 0x22, 0x80, 0x00,
   0x22, 0x80, 0x00, 0xfa, 0xbe, 0x00, 0x22, 0x80, 0x00, 0x22, 0x80, 0x00,
   0x02, 0x80, 0x00, 0x22, 0xa2, 0x00, 0x02, 0x94, 0x00, 0xfa, 0x88, 0x00,
   0x02, 0x94, 0x00, 0x22, 0xa2, 0x00, 0x02, 0x80, 0x00, 0xfe, 0xff, 0x00,
   0x00, 0x00, 0x00};
/* routine to make a pixmap stolen from session mgr */
static Pixmap MakePixmap(dpy, root, data, width, height) 
Display *dpy;
Drawable root;
short *data;
Dimension width, height;
{
    Pixmap pid;
    pid = XCreatePixmapFromBitmapData (dpy, root, data,
		(Dimension) width, (Dimension) height, 
		(unsigned long) BlackPixel (dpy, 0),
		(unsigned long) WhitePixel (dpy, 0),
		(unsigned int) DefaultDepth (dpy, 0));
    return(pid);
}
    icon_pixmap = MakePixmap (dpy, XDefaultRootWindow (dpy),
		calc_bits, calc_width, calc_height);
              
    sm_icon_pixmap = MakePixmap (dpy, XDefaultRootWindow (dpy),
       		sm_calc_bits, sm_calc_width, sm_calc_height);
    xtnumber = 0;
    XtSetArg (args [xtnumber],  XtNiconPixmap, icon_pixmap); xtnumber++;
    XtSetArg (args [xtnumber],  XtNiconifyPixmap, sm_icon_pixmap); xtnumber++;
    XtSetArg (args [xtnumber],  XtNcopyright, TRUE); xtnumber++;
    XtSetArg (args [xtnumber],  XtNallowShellResize, TRUE); xtnumber++;
    XtSetValues (toplevel, args, xtnumber);
    XtRealizeWidget (toplevel, 0, NULL);
    XtMainLoop ();
}
 |