aw0i+@andrew.cmu.edu (Andrew Jordan Werth) (12/06/88)
Does anybody know of a really easy way to get the absolute X and Y positions of the mouse, in C, relative to the Workbench screen, at all times? I need the values even while my window is inactive. Thanks, Andrew Werth
cmcmanis%pepper@Sun.COM (Chuck McManis) (12/10/88)
In article <IXanoby00Uo5E0ZFdK@andrew.cmu.edu> (Andrew Jordan Werth) writes: > Does anybody know of a really easy way to get the absolute X and Y > positions of the mouse, in C, relative to the Workbench screen, at all > times? I need the values even while my window is inactive. >Thanks, >Andrew Werth I always kind of wonder about questions like this. Please let us know what you need this information for, if it's a screen hack or something then the answer is "Just read it out of the Workbench screen structure." Robotroff is a good example of this. Sure it will break under future releases but you don't care right? I can't think of a really supported way to do this (there is no MousePos(*x,*y) call that lets Intuition let you know what it thinks) The other option is to look at the sprite 0 registers and see where it is. If you have a "legitimate" reason to need this information I would be interested in hearing about it. --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you.