cursorset.c - sam - An updated version of the sam text editor. | |
git clone git://vernunftzentrum.de/sam.git | |
Log | |
Files | |
Refs | |
LICENSE | |
--- | |
cursorset.c (360B) | |
--- | |
1 /* Copyright (c) 1998 Lucent Technologies - All rights reserved. */ | |
2 #include <u.h> | |
3 #include <libg.h> | |
4 #include "libgint.h" | |
5 | |
6 /* | |
7 * Only allow cursor to move within screen Bitmap | |
8 */ | |
9 void | |
10 cursorset(Point p) | |
11 { | |
12 /* motion will be relative to window origin */ | |
13 p = sub(p, screen.r.min); | |
14 XWarpPointer(_dpy, None, (Window)screen.id, 0, 0, 0, 0, p.x, p.y); | |
15 } |