home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!olivea!apple!netcomsv!terapin!paulk
- From: paulk@terapin.com (Paul Kienitz)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: LockIBase
- Message-ID: <paulk.2z9x@terapin.com>
- Date: 29 Dec 92 00:22:35 GMT
- References: <JTP.92Dec27193513@laphroaig.cs.hut.fi>
- Organization: BBS
- Lines: 15
-
- > Well suppose one would want to write a commodity to activate the
- > window under the mouse pointer on keypress.
-
- That is a tricky one. What DMouse does is try WhichLayer() on each
- screen in turn until it finds the right screen. Then there's further
- trouble because the coordinates in the input event do not match the
- X/Y coordinates of the screen itself, and translating them gets real
- obscure when you have e.g. PAL and NTSC mixed together. I ended up
- working around this in my personal DMouse variant by grabbing the
- MouseX and MouseY fields of the screen itself, so it activates the
- window where the mouse was as of the PREVIOUS input event instead of
- the current one.
-
- Does anyone know a way (preferably forward-compatible) to convert
- arbitrary input event coordinates to screen coordinates?
-