home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.windows.x:19132 comp.windows.x.intrinsics:531
- Path: sparky!uunet!ukma!darwin.sura.net!zaphod.mps.ohio-state.edu!ub!acsu.buffalo.edu!okeefe
- From: okeefe@cs.Buffalo.EDU (Paul O'Keefe)
- Newsgroups: comp.windows.x,comp.windows.x.intrinsics
- Subject: Event order: EnterNotify before Expose?
- Message-ID: <BxoJ9I.L94@acsu.buffalo.edu>
- Date: 14 Nov 92 00:12:53 GMT
- Sender: nntp@acsu.buffalo.edu
- Organization: State University of New York at Buffalo/Comp Sci
- Lines: 24
- Originator: okeefe@dubhe.cs.buffalo.edu
- Nntp-Posting-Host: dubhe.cs.buffalo.edu
-
-
- Implementing Tektronix-style crosshairs, I've run into a problem
- caused by the order in which events arrive.
-
- Scenario:
-
- An obscuring window in unmapped and the pointer "falls" into my app window.
- The EnterNotify arrives followed by an Expose event.
- The EnterNotify handler draws the crosshairs in XOR mode.
- The Expose handler then overwrites part of the crosshairs
- so the original pixels can't be recovered.
-
- Question 1:
-
- One solution is for the EnterNotify handler to examine
- the event queue for Expose events and service them first.
- Is there another solution that's easier and/or better?
-
- Question 2:
-
- Does EnterNotify allows precede Expose in this scenario?
- If so why?
-
- -Paul O'Keefe
-