Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-pcd!hpcvlx.cv.hp.com!gabe From: gabe@hpcvlx.cv.hp.com. (Gabe Begeddov) Newsgroups: comp.windows.x.motif Subject: Re: XmUpdateDisplay - the little engine that couldn't? Message-ID: <110630054@hpcvlx.cv.hp.com.> Date: 23 Jun 91 13:52:09 GMT References: Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 40 > / hpcvlx.cv.hp.com:comp.windows.x.motif / bazavan@hpdtczb.HP.COM (Valentin Bazavan) / 7:37 am Jun 19, 1991 / > > The sequence below always works for me: > > XmUpdateDisplay > sleep > XmUpdateDisplay > > The problem with this approach is that the shortest suspension time you > can set using sleep(3) is one second; that's too long. You will have > to write your own sleep() to allow shorter suspension times. > Another problem is that it isn't guaranteed to work. Since the dialog is a non-override redirect window it is mapped by the wm rather than by the client. Since the wm could be swapped out or on a slow link you are not quaranteed that it will respond in 1 second. A local event loop waiting for a MapNotify on the dialog is probably your best bet. Something like: while (1) { XtAppNextEvent(app, &event); if (event.xany.type == MapNotify && event.xany.window == XtWindow(dialogShell)) { XmUpdateDisplay(dialogShell); return; } else XtDispatchEvent(&event); } > Valentin Bazavan > vbazavan@dtc.hp.com > ---------- > > Gabe Beged-Dov gabe@cv.hp.com