/*
 * -- $Header: /cec/src/nestor/servers/R3/shXlib/XDefCursor.c,v 1.1.1.1
 * 90/04/23 09:55:14 spanachi Exp $
 */

#include "copyright.h"

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

/* -- MULTIPLEX Extension -- */

#include "Xlibint.h"

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

XDefineCursor (dpy, w, cursor)
  register Display *dpy;
  Window w;
  Cursor cursor;
{
  register xChangeWindowAttributesReq *req;

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

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

    attributes.cursor = cursor;
    XmuXUpdateWindowInfo (dpy, w, CWCursor, &attributes);
  }
  UnlockDisplay (dpy);
  SyncHandle ();
}
