Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucbvax!ECN.PURDUE.EDU!tongz From: tongz@ECN.PURDUE.EDU (Tong Zheng) Newsgroups: comp.windows.x Subject: Can an application know a DESTROY/KILL is applied on itself? Message-ID: <9101140734.AA16046@mn.ecn.purdue.edu> Date: 14 Jan 91 07:34:26 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 41 Hi, The subject line may look a little confusing, I will give detail in following. I am running X11R4, and using Xlib&Xt in twm/mwm/olwm. By far I understand, to destroy a window in a WM, such as using "destroy/kill" in twm, "close" in mwm, is to tell X server to close the connection with the application which creates the window. My question is, is there any way an application can be notified or get to know a DESTROY/KILL instruction is applied to the application. The purpose to do that is for safty. For example, a drawing program certainly wants to save the contents before terminated by an acciendly DESTROY/KILL from the WM. The DestroyNotify in Xlib doesn't work because the X serevr will first close the connection with application, how do you expect the application can get any event after the connection is closed. I tried the destroyCallback in Xt(using Athena Widget Set), but my codes in the callback function didn't get processed at all. Well, I don't know whether my understanding above is right or not. I would like to hear opinions from you Xperts. Any comment or suggestion is appreciated. You may post on the net or reply via e-mail. If there are enough interests, I will post the summary on the net. --- * * |* Zheng, Tong | ARPA: tongz@mn.ecn.purdue.edu *| |* 483 Littleton St., | UUCP: pur-ee!tongz *| |* West Lafayette, IN. 47906 | BITNET: *| |* (317)743-2239 | tongz%ecn.purdue.edu@purccvm *| |* ----------- *| |* -- student programmer, Mechanical Eng., Purdue University-- *| *----------------------------------------------------------------*