Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!spool.mu.edu!sdd.hp.com!elroy.jpl.nasa.gov!thyme!kaleb From: kaleb@thyme.jpl.nasa.gov (Kaleb Keithley) Newsgroups: comp.windows.x Subject: Re: XFlush/XSync inside the widget or in the app Message-ID: <1991Feb15.164855.2480@thyme.jpl.nasa.gov> Date: 15 Feb 91 16:48:55 GMT References: <1991Feb13.225240.547@thyme.jpl.nasa.gov> <9102141621.AA03712@iris49.biosym.com> Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 33 In article <9102141621.AA03712@iris49.biosym.com> pete@iris49.UUCP (Pete Ware) writes: >Philosophically speaking, neither a widget nor an application should >ever call XSync or XFlush. XFlush gets called from the event loop or >when the data buffer is full. Things usually refresh fastest if you >never explicitely XFlush. > I tend to disagree with this, and cite the follow examples: An application that performs computationally intensive routines, and wants to manage a popup dialog notifying the user to wait. If the buffer is not flushed with either an XFlush or XSync, there is no guarantee that the popup will be mapped. Using XFlush or XSync after managing will ensure this. This example has been a frequent topic in c.w.x.m. Our application creates and manages hundreds of widgets as part of a psuedo real-time status display. In early testing, we discovered that after managing, while awaiting data to display, many widgets weren't drawn until after a (considerable) delay. The strategic placement of an XSync guaranteed the timely drawing of all the widgets that had been managed. As we are using Motif, we can't go adding to these widgets, but for the widgets we are writing, we have a clean slate. So to re-iterate my original question: If we have a widget that is internally doing a large amount of drawing, where should we do the XFlush/Xsync, inside or outside the widget? -- Kaleb Keithley kaleb@thyme.jpl.nasa.gov As of right now, I'm in charge here now... Alexander Haig. Voodoo Economics, that's what it is, voodoo economics. George Bush