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

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

/* -- MULTIPLEX Extension -- */

#include "Xlibint.h"

/* -- additional includes -- */
#include "resources.h"

XSetWindowBorder (dpy, w, pixel)
  register Display *dpy;
  Window w;
  unsigned long pixel;
{
  register xChangeWindowAttributesReq *req;

  LockDisplay (dpy);
  GetReqExtra (ChangeWindowAttributes, 4, req);
  req->window = w;
  req->valueMask = CWBorderPixel;
  OneDataCard32 (dpy, NEXTPTR (req, xChangeWindowAttributesReq), pixel);

  /* -- update the appropriate resource info if necessary -- */
  if (XmuXStoreResources (dpy)) {
    XSetWindowAttributes attributes;

    attributes.border_pixel = pixel;
    XmuXUpdateWindowInfo (dpy, w, CWBorderPixel, &attributes);
  }
  UnlockDisplay (dpy);
  SyncHandle ();
}
