home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 17967 < prev    next >
Encoding:
Text File  |  1992-12-30  |  1.9 KB  |  48 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!jato!jdickson
  3. From: jdickson@jato.jpl.nasa.gov (Jeff Dickson)
  4. Subject: Re: LockIBase
  5. Message-ID: <1992Dec31.033408.8422@jato.jpl.nasa.gov>
  6. Organization: Jet Propulsion Laboratory
  7. References: <JTP.92Dec27193513@laphroaig.cs.hut.fi> <paulk.2z9x@terapin.com> <JTP.92Dec30235759@cardhu.cs.hut.fi>
  8. Distribution: inet
  9. Date: Thu, 31 Dec 1992 03:34:08 GMT
  10. Lines: 36
  11.  
  12. In article <JTP.92Dec30235759@cardhu.cs.hut.fi> jtp@cs.hut.fi (Jukka Partanen) writes:
  13. >In article <paulk.2z9x@terapin.com> paulk@terapin.com (Paul Kienitz) writes:
  14. >
  15. >> I ended up
  16. >> working around this in my personal DMouse variant by grabbing the
  17. >> MouseX and MouseY fields of the screen itself, so it activates the
  18. >> window where the mouse was as of the PREVIOUS input event instead of
  19. >> the current one.
  20. >
  21. >    Well, that's about the same approach I use, and I've found it
  22. >    to be adequate. What I really would like to know is the
  23. >    correct locking protocol. First I LockIBase to browse through
  24. >    the screens and find the correct one, but then I must release
  25. >    to IBase lock to call WhichLayer. But the owner of the screen
  26. >    may close it after the IBase is released, so I must Forbid
  27. >    before unlocking the IBase and Permit after finding and
  28. >    activating the window. Yuck, I say. Isn't there a better way?
  29. >
  30. >> Does anyone know a way (preferably forward-compatible) to convert
  31. >> arbitrary input event coordinates to screen coordinates?
  32. >
  33. >    If you find out a cool way, tell me too!
  34. >
  35. >    jtp
  36. >
  37.  
  38.     In a program I wrote, I examine the Mouse X and Y fields off of
  39. IntuitionBase to determine the mouse current screen coordinates. I don't
  40. think it would be possible to convert arbitrary input event coordinates
  41. into screen coordinates, because the coordinates of the mouse therein are
  42. relative to its previous position. Another plus is that IntuitionBase
  43. does not need to be locked.
  44.  
  45. Jeff
  46.  
  47.  
  48.