Anonymous user
Mouse position: Difference between revisions
m
→{{header|Standard ML}}
(→{{header|Standard ML}}: now wrt focus) |
|||
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
XGetInputFocus dp
) ;
XQueryPointer focus ;
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 =
XPoint {x =
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
|