[comp.windows.x] X11 bug or am I doing something wrong???

lansd@godzilla.ele.toronto.edu (Robert Lansdale) (03/04/88)

	As an introduction to X11 programming I wrote a front end
driver for my 3d graphics package (under development). It more or
less opens up a window, sets up everything, then starts throwing
XDrawLine requests at the server. The problem I find is that some
(and in other cases all) of my requests don't get drawn! It is
usually the first requests that don't get drawn.

	I tried 'XSync(dpy, 0)' everywhere to make sure the server
had finished with the requests, but the problem prevailed. Then I
placed a 'sleep(1)' after the 'XDrawLine()', and TA DA! it worked,
yet very slowly. I believe our X11 software is up to date, so is
this a bug in Ver 1 of X11?

jg@jumbo.dec.com (Jim Gettys) (03/11/88)

In order to guarantee reliable applications, applications must
wait until the first expose event before proceeding to draw.
Some window managers will intercept the map request to control placement
or add window decoration.  In these cases, your map request never
takes place, but the window manager gets around to issuing one on your
behalf sometime later.  Graphics requests sent in this interval
of time may be lost.
				- Jim