Path: utzoo!attcan!uunet!cs.utexas.edu!mailrus!purdue!bu-cs!bloom-beacon!EXPO.LCS.MIT.EDU!kit From: kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) Newsgroups: comp.windows.x Subject: Re: Window Creation Question Message-ID: <8910161515.AA22379@expo.lcs.mit.edu> Date: 16 Oct 89 15:15:13 GMT References: <8910160634.AA13854@arisia.Xerox.COM> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 24 > Also, if I want to do all my input via files, this would mean > I don't need to handle any events.... event_mask = 0. There is no way to write a proper X program that does not handle events. You must have a window visable on display, or all your drawing commands will be tossed in the bit bucket. The only way to make sure that this is true is to wait for expose events. Since the X model also requires the application to repair any damage to the window caused by it being obscured, you must also be prepared to redraw the contents of your window on any expose event. I would strongly suggest that you have a routine that repaints the contents of the window whenever an expose event with count == 0 is received. If you set things up properly you should be able just set up your internal data structure, create the windows, and the wait for expose events. I hope this helps. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213