home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / mac / programm / 20247 < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.7 KB  |  41 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!gatech!concert!sas!mozart.unx.sas.com!studly.mac.sas.com!Michael_Hecht
  3. From: Michael Hecht <Michael_Hecht@mac.sas.com>
  4. Subject: Distinguishing FrontClicks?
  5. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  6. Message-ID: <BzpzH1.8tD@unx.sas.com>
  7. X-Useragent: Nuntius v1.1.1d16
  8. Date: Wed, 23 Dec 1992 16:07:49 GMT
  9. X-Xxdate: Wed, 23 Dec 92 16:07:44 GMT
  10. X-Xxmessage-Id: <A75DF9007601050A@studly.mac.sas.com>
  11. Nntp-Posting-Host: studly.mac.sas.com
  12. Organization: SAS Institute Inc.
  13. Lines: 26
  14.  
  15. Hello!
  16.  
  17. I turned on the getFrontClicks bit in my SIZE resource, because it makes
  18. sense for my application. However, I don't want *all* parts of the window
  19. to respond to layer-changing clicks. How can I distinguish a click that
  20. changes my layer from other clicks?
  21.  
  22. I can't just assume the next click after a resume event is a frontClick,
  23. since the user may have switched to me via the application menu or by
  24. double-clicking my Finder icon. For all I know, some other app may have
  25. called SetFrontProcess for me! Just throwing out the next click would
  26. probably frustrate the user (me) in these cases.
  27.  
  28. The best method I could think of is to use EventAvail to look for
  29. mouseDown events in my resume event handler. If I see one I'll set a flag
  30. that I can look at in my mouseDown handler. Is this a reliable method?
  31.  
  32. What I'd prefer is something along the lines of an event modifiers flag
  33. on the mouseDown that says "this event caused you to switch layers."
  34.  
  35. Thanks!
  36. --Michael
  37.  
  38. =======================================================================
  39. Michael P. Hecht                 | Internet:  Michael_Hecht@mac.sas.com
  40. SAS Institute Inc.; Cary, NC USA | AppleLink: SAS.HECHT
  41.