Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!uakari.primate.wisc.edu!ames!sun-barr!decwrl!gilroy.pa.dec.com!klee From: klee@gilroy.pa.dec.com (Ken Lee) Newsgroups: comp.windows.x Subject: Re: Problem with writing in the window Message-ID: <1752@bacchus.dec.com> Date: 31 Aug 89 16:58:11 GMT References: <3239@wasatch.utah.edu> Sender: news@decwrl.dec.com Lines: 18 In article <3239@wasatch.utah.edu>, margaret%muav.utah.edu@wasatch.utah.edu (Malgorzata Sturgill) writes: > The strange thing is that the program seems to work fine, as long as > there is no window > managerrunning ( I tried uwm and awm). This is one of the most common Xlib user errors. X is asyncronous, so there is no guarantee that your window is mapped when the XMapWindow call returns. If it is not mapped (and you are not using or do not have backing store), your drawings drop in the bit bucket. Most X programs wait for an Expose or Map event before drawing. Many just drop into an event loop after setting up their windows, with the initial Expose event being handled the same as any subsequent Expose event. Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@decwrl.dec.com uucp: uunet!decwrl!klee