Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!wuarchive!uunet!pmafire!uudell!bigtex!texsun!sundc!newstop!exodus!argv From: argv@turnpike.Eng.Sun.COM (Dan Heller) Newsgroups: comp.windows.x.motif Subject: Re: Warning Dialog Keywords: Warning Dialog Hour Glass Message-ID: <5061@exodus.Eng.Sun.COM> Date: 29 Dec 90 22:20:36 GMT References: <9602@ncar.ucar.edu> Sender: news@exodus.Eng.Sun.COM Distribution: usa Organization: O'Reilly && Associates Lines: 38 In article <9602@ncar.ucar.edu> morreale@bierstadt.scd.ucar.edu (Peter Morreale) writes: > >How can I ensure that a warning dialog widget disappears IMMEDIATELY after > >clicking on (any of the buttons) OK or CANCEL OR HELP? > >I tried putting XtDestroyWidget(w) as the 1st statement of the callback, > >but It does not do the trick! > >The dialog box seems to disappear only after the callback associated with any > >of these buttons terminates!! > > > Perhaps you need to Unmap the widget??? You needed to process the X events that are generated from the widget's destruction and unmapping.... but this seems to be old news now... > >Also, I would like to display (and remove) the Motif hourglass to indicate > >that there is work in progress. How can I do this? > What I did, (Thank you der mouse!) is to create an InputOnly window > covering the toplevel window for the duration of the work in > progress. The only attribute I gave the window was a "watch" cursor. > I simply map the window just prior to starting the work, and unmap it > after the work is done. Works like a charm, nice visual too. This sounds identical to the solution I posted to thise newsgroup a couple of months ago. However, my implementation had some quirks in it that aren't very nice given other, less likely (but possible) circumstances. I didn't figure out at the time, but now that I have, I'm worried that "bad code" is being circulated. Send me what you've got so I can check. If you have something different, maybe I can learn something new from it. There are also other possible solutions without using InputOnly windows now, but I don't want to get into that out of context of this discussion. -- dan ---------------------------------------------------- O'Reilly && Associates argv@sun.com / argv@ora.com Opinions expressed reflect those of the author only.