Jump to content

Mouse position: Difference between revisions

m
Line 1,306:
val w = XCreateSimpleWindow (RootWindow dp) origin (Area {x=0,y=0,w=400,h=300}) 3 0 0xffffff ;
XMapWindow w;
val (focus,_)=( Posix.Process.sleep (Time.fromReal 2.0); (* time to move from interpreter and activatearbitrary window *)
XGetInputFocus dp
) ;
XQueryPointer focus ;</lang>
XQueryPointer w;</lang>
result: position wrt root window and active window, resp wrt root window and window w
val it =
(true, Drawable, Drawable, XPoint {x = 12301259, y = 940979},
XPoint {x = 211236, y = 62105}, []):
bool * Drawable * Drawable * XPoint * XPoint * Modifier list
val it =
(true, Drawable, Drawable, XPoint {x = 1259, y = 979},
XPoint {x = 1056, y = 817}, []):
bool * Drawable * Drawable * XPoint * XPoint * Modifier list
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.