home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!elroy.jpl.nasa.gov!jato!jdickson
- From: jdickson@jato.jpl.nasa.gov (Jeff Dickson)
- Subject: Re: LockIBase
- Message-ID: <1992Dec31.033408.8422@jato.jpl.nasa.gov>
- Organization: Jet Propulsion Laboratory
- References: <JTP.92Dec27193513@laphroaig.cs.hut.fi> <paulk.2z9x@terapin.com> <JTP.92Dec30235759@cardhu.cs.hut.fi>
- Distribution: inet
- Date: Thu, 31 Dec 1992 03:34:08 GMT
- Lines: 36
-
- In article <JTP.92Dec30235759@cardhu.cs.hut.fi> jtp@cs.hut.fi (Jukka Partanen) writes:
- >In article <paulk.2z9x@terapin.com> paulk@terapin.com (Paul Kienitz) writes:
- >
- >> 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.
- >
- > Well, that's about the same approach I use, and I've found it
- > to be adequate. What I really would like to know is the
- > correct locking protocol. First I LockIBase to browse through
- > the screens and find the correct one, but then I must release
- > to IBase lock to call WhichLayer. But the owner of the screen
- > may close it after the IBase is released, so I must Forbid
- > before unlocking the IBase and Permit after finding and
- > activating the window. Yuck, I say. Isn't there a better way?
- >
- >> Does anyone know a way (preferably forward-compatible) to convert
- >> arbitrary input event coordinates to screen coordinates?
- >
- > If you find out a cool way, tell me too!
- >
- > jtp
- >
-
- In a program I wrote, I examine the Mouse X and Y fields off of
- IntuitionBase to determine the mouse current screen coordinates. I don't
- think it would be possible to convert arbitrary input event coordinates
- into screen coordinates, because the coordinates of the mouse therein are
- relative to its previous position. Another plus is that IntuitionBase
- does not need to be locked.
-
- Jeff
-
-
-