tony@sat.uucp (01/22/91)
I need to trap the f.kill issued by the window manager (at user command) and do some cleaning up before my application exits; is there any way to trap this "event or signal" ? any responses will be greatly appreciated !! -- Tony Leung vsi1!sat!tony tony%sat@vicom.com
evans@decvax.DEC.COM (Marc Evans) (01/25/91)
In article <1991Jan22.010234.15702@sat.uucp>, tony@sat.uucp writes: |> I need to trap the f.kill issued by the window manager (at user command) |> and do some cleaning up before my application exits; is there any way to |> trap this "event or signal" ? Use the XSetIOErrorHandler function to set up a function to be called when the Fatal IO error occurs, one of which would be a server disconnection. You will need to be careful here, in that the only other X calls you should make are to free memory. The function is not expected to return, so be sure that it doesn't. - Marc -- =========================================================================== Marc Evans - WB1GRH - evans@decvax.DEC.COM | Synergytics (603)635-8876 Unix and X Software Contractor | 21 Hinds Ln, Pelham, NH 03076 ===========================================================================
bill@polygen.uucp (Bill Poitras) (02/04/91)
In article <110630031@hpcvlx.cv.hp.com> keith@hpcvlx.cv.hp.com (Keith Taylor) writes: >Use the WM_DELETE_WINDOW protocol as described in the Inter-Client >Communication Conventions Manual (ICCCM). You will get a >WM_DELETE_WINDOW message from the window manager in response to an >f.kill. I don't think that TWM can trap f.kill, even if WM_DELETE_WINDOW is set on a window. I believe the function you need to use to destroy a window that uses the WM_DELETE_WINDOW protocol f.delete. See the man page for TWM. +-----------------+---------------------------+-----------------------------+ | Bill Poitras | Polygen Corporation | {princeton mit-eddie | | (bill) | Waltham, MA USA | bu sunne}!polygen!bill | | | FAX (617)890-8694 | bill@polygen.com | +-----------------+---------------------------+-----------------------------+