Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-pcd!hpcvlx!rodman From: rodman@hpcvlx.cv.hp.com (Steve Roderick) Newsgroups: comp.windows.x.motif Subject: Re: How does one establish a destroy function within an application? Message-ID: <110630010@hpcvlx.cv.hp.com> Date: 28 Sep 90 19:29:50 GMT References: <1990Sep13.190248.21038@media.uucp> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 24 / hpcvlx:comp.windows.x.motif / arthur@media.uucp (Art Poley) / 12:02 pm Sep 13, 1990 / 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 ----------