Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!uiucdcs!carroll From: carroll@cs.uiuc.edu (Alan M. Carroll) Newsgroups: comp.windows.x.motif Subject: Re: WM closing sub-top-level windows Message-ID: <1991Jun26.181103.11814@m.cs.uiuc.edu> Date: 26 Jun 91 18:11:03 GMT References: <1991Jun21.181233.2669@watserv1.waterloo.edu> <1991Jun26.040858.23338@telesoft.com> Sender: news@m.cs.uiuc.edu (News Database (admin-Mike Schwager)) Distribution: na Organization: Technophiles Inc. - Engineers with Attitude Lines: 18 Nntp-Posting-Host: ash.cs.uiuc.edu In article <1991Jun26.040858.23338@telesoft.com>, jdart@telesoft.com (Jon Dart @pulsar) writes: > As for getting notified when top-level windows are destroyed, > I believe you are on the right track using XmAddProtocolCallback. I've already replied by email, but I wanted to follow up this posting because I believe that it is the wrong approach. What I recommened to the original poster is to tap into the destroy widget callback. You pass what you need to the callback or use the XmNuserData resource to allow the callback to get to the right information. This has the added benefit that if for some reason your program decides to toast off the window, it just has to do an XtDestroyWidget(), knowning that teh callback will take care of the details. I have a working program that uses this method, and it has turned out very well. -- Alan. Carroll <-- Another casualty of applied metaphysics Epoch Development Team Urbana Il. "I hate shopping with the reality-impaired" - Susan