Xref: utzoo comp.windows.x:26959 comp.windows.x.motif:715 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!samsung!uunet!cos!hqda-ai!media!arthur From: arthur@media.uucp (Art Poley) Newsgroups: comp.windows.x,comp.windows.x.motif Subject: How does one establish a destroy function within an application? Message-ID: <1990Sep13.190248.21038@media.uucp> Date: 13 Sep 90 19:02:48 GMT Organization: Media Cybernetics, Inc. Lines: 20 This is most likely something that should be added to the Frequently Asked Questions list. The question being, How does one implement a destroy function similar to SunView's notify_interpose_destroy_func? This function would be called whenever the user quits the window (most likely from the window menu). Note that the implementation should work on a variety of window managers (mwm, twm, etc.). I've noticed that mwm seems to send an XClientMessageEvent to the application. The client message has an Atom name of WM_PROTOCOLS (found via XGetAtomName on the message_type field of the message). Twm, on the other hand, notes within its documentation that twm will send a WM_DELETE_WINDOW if the application has requested it through the WM_PROTOCOLS property. How does one do this? I'd appreciate anyones comments on how one goes about registering a destroy function. Thanks! -- -------------------------------------------------------------------------- Art Poley - Media Cybernetics Phone: (301)495-3305 (5964 FAX) Internet: arthur%media@uunet.uu.net UUCP: {uunet,hqda-ai}!media!arthur