summaryrefslogtreecommitdiff
path: root/libXg/cursorset.c
blob: 40b744bf17fb85acb4015e7213dbefc10cee3872 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* Copyright (c) 1992 AT&T - All rights reserved. */
#include <libc.h>
#include <libg.h>
#include "libgint.h"

/*
 * Only allow cursor to move within screen Bitmap
 */
void
cursorset(Point p)
{
	/* motion will be relative to window origin */
	p = sub(p, screen.r.min);
	XWarpPointer(_dpy, None, (Window)screen.id, 0, 0, 0, 0, p.x, p.y);
}