Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!ucsd!ucbvax!alfalfa.com!nazgul From: nazgul@alfalfa.com (Information Junkie) Newsgroups: comp.windows.x.motif Subject: Re: Dialog Unmap/'Close' Question and Problem -REVISITED- Message-ID: <910506100411.1238@sun.alfalfa.com> Date: 6 May 91 14:04:11 GMT References: <1991May3.175805.27038@mlb.semi.harris.com> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 33 > the children dialogs, even though they disappear. For example, 'Close' > dialog2, then dialog2 & dialog3 disappear, and dialog2 UnmapCallback gets > called but dialog3 UnmapCallback does *NOT*. The default action on a CLOSE of a dialog is to unmap it (which is pretty silly, since there is no callback to let you know that it happened). The window manager is nice enough to also unmap the children of the dialog, BUT DON'T RELY ON IT! Other window manager's (olwm in particular) are not so kind. You are best off installing a callback that is called when your window gets a WM_DELETE_WINDOW event and manually unmapping your other windows. > I did receive one reply telling me to try XmAddWMProtocolCallback, and > check the WM_DELETE_WINDOW protocol. Well I tried several combinations > of this, but to no avail. This will work - it just only gets called on the actually dialog that was closed. What you could do is have each child dialog add a protocol callback to its parent dialog so that it will be notified when the parent gets a WM_DELETE_WINDOW. Then have it send a WM_DELETE_WINDOW to itself, so any children of its own will be notified. Alternatively you could just turn off CLOSE in dialogs :-). Note that this problem also exists for children of main windows, and for the case where a main window is iconized. P.S. You should include your address in your .signature. Alfalfa Software, Inc. | Poste: The EMail for Unix nazgul@alfalfa.com | Send Anything... Anywhere 617/646-7703 (voice/fax) | info@alfalfa.com I'm not sure which upsets me more: that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's.