/*
 * -- $Header: /cec/src/nestor/servers/R3/shXlib/XChCmap.c,v 1.1.1.1 90/04/23
 * 09:52:21 spanachi Exp $
 */
#include "copyright.h"

/* $XConsortium: XChCmap.c,v 11.7 88/09/06 16:04:25 jim Exp $ */
/* Copyright    Massachusetts Institute of Technology    1986	 */

/* -- MULTIPLEX Extension -- */

#include "Xlibint.h"
/* -- additinol includes -- */
#include "resources.h"


XSetWindowColormap (dpy, w, colormap)
  register Display *dpy;
  Window w;
  Colormap colormap;
{
  register xChangeWindowAttributesReq *req;

  LockDisplay (dpy);
  GetReqExtra (ChangeWindowAttributes, 4, req);
  req->window = w;
  req->valueMask = CWColormap;
  OneDataCard32 (dpy, NEXTPTR (req, xChangeWindowAttributesReq), colormap);
  if (XmuXStoreResources (dpy)) {
    XSetWindowAttributes attr;

    attr.colormap = colormap;
    XmuXUpdateWindowInfo (dpy, w, CWColormap, &attr);
  }
  UnlockDisplay (dpy);
  SyncHandle ();
}
