🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #36960

Re: Question about XCopyArea

#36960
From: der Mouse
Date: Sat, 17 Feb 1990 07:29
36 lines
1651 bytes
> 3) Every 20 ticks I call XSync(dpy, True).  The "true" means my
>    program actually waits until the X server has processed *all* the
>    events I've sent it.

No, the True means you're throwing events away.  XSync(dpy,False) is
enough to wait for the server to catch up.

From the Xlib doc:

	To flush the output buffer and then wait until all requests
	have been processed, use XSync.
	
	XSync(display, discard)
	      Display *display;
	      Bool discard;
	
	display   Specifies the connection to the X server.
	
	discard   Specifies a Boolean value that indicates whether
	          XSync discards all events on the event queue.
	
	The XSync function flushes the output buffer and then waits
	until all requests have been received and processed by the X
	server.  [...stuff about error events...]
	          Any events generated by the server are enqueued
	into the library's event queue.
	
	Finally, if you passed False, XSync does not discard the
	events in the queue.  If you passed True, XSync discards all
	events in the queue, including those events that were on the
	queue before XSync was called.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu
Technical Details
Message-ID: <9002170729.AA17190@Larry.McRCIM.McGill.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!umich!samsung!usc!snorkelwacker!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!umich!samsung!usc!snorkelwacker!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse
From: mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse)
Newsgroups: comp.windows.x
Subject: Re: Question about XCopyArea
Message-ID: <9002170729.AA17190@Larry.McRCIM.McGill.EDU>
Date: 17 Feb 90 07:29:57 GMT
Sender: daemon@athena.mit.edu (Mr Background)
Organization: The Internet
Lines: 36