home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / windows / x / 19132 < prev    next >
Encoding:
Internet Message Format  |  1992-11-14  |  1.2 KB

  1. Xref: sparky comp.windows.x:19132 comp.windows.x.intrinsics:531
  2. Path: sparky!uunet!ukma!darwin.sura.net!zaphod.mps.ohio-state.edu!ub!acsu.buffalo.edu!okeefe
  3. From: okeefe@cs.Buffalo.EDU (Paul O'Keefe)
  4. Newsgroups: comp.windows.x,comp.windows.x.intrinsics
  5. Subject: Event order: EnterNotify before Expose?
  6. Message-ID: <BxoJ9I.L94@acsu.buffalo.edu>
  7. Date: 14 Nov 92 00:12:53 GMT
  8. Sender: nntp@acsu.buffalo.edu
  9. Organization: State University of New York at Buffalo/Comp Sci
  10. Lines: 24
  11. Originator: okeefe@dubhe.cs.buffalo.edu
  12. Nntp-Posting-Host: dubhe.cs.buffalo.edu
  13.  
  14.  
  15. Implementing Tektronix-style crosshairs, I've run into a problem
  16. caused by the order in which events arrive.
  17.  
  18. Scenario:
  19.  
  20. An obscuring window in unmapped and the pointer "falls" into my app window.
  21. The EnterNotify arrives followed by an Expose event. 
  22. The EnterNotify handler draws the crosshairs in XOR mode.
  23. The Expose handler then overwrites part of the crosshairs
  24. so the original pixels can't be recovered.
  25.  
  26. Question 1:
  27.  
  28. One solution is for the EnterNotify handler to examine
  29. the event queue for Expose events and service them first.
  30. Is there another solution that's easier and/or better?
  31.  
  32. Question 2:
  33.  
  34. Does EnterNotify allows precede Expose in this scenario?
  35. If so why?
  36.  
  37. -Paul O'Keefe
  38.