Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!bu.edu!polygen!bill From: bill@polygen.uucp (Bill Poitras) Newsgroups: comp.windows.x Subject: Re: WM_SAVE_YOURSELF Message-ID: <968@redford.UUCP> Date: 1 Feb 91 20:50:09 GMT References: <1991Jan22.064227.4656@agate.berkeley.edu> <100920280@hpcvlx.cv.hp.com> <1991Jan25.201354.17242@agate.berkeley.edu> Reply-To: bill@redford.UUCP (Bill Poitras(X258)) Organization: Polygen Corporation, Waltham, MA Lines: 28 In article <1991Jan25.201354.17242@agate.berkeley.edu> scott@xcf.berkeley.edu writes: >MY QUESTION IS: How do I prevent my application from getting blown away by > the WM_SAVE_YOURSELF mechanism? Is this even possible according to ICCC? > (I thought it was, but perhaps I am reading ICCCM wrong?). I don't think you prevent WM_SAVE_YOURSELF from blowing you away. You have to maken sure that WM_PROTOCOLS window property is not set for your application. In Motif, you should make sure that WM_SAVE_YOURSELF is not being set. For further information, consult the Motif Programmer's Guide. In the version 1.0 manual, this is section 8.8.2 Protocol Manager Functions. > >What I would like to do is prompt the user with a dialog box that says "Do you > really want me to quit?" and if the user clicks "No", then I'd like to go on > with life and not get killed (Or have my window unmapped for that matter!). According to ICCCM (pg 39) "Clients receiving WM_SAVE_YOURSELF should place themselves in a state from which they can be restarted ... No interactions with the user are permitted during this process." So if WM_SAVE_YOURSELF is used you can't let the user save the changes it has made. +-----------------+---------------------------+-----------------------------+ | Bill Poitras | Polygen Corporation | {princeton mit-eddie | | (bill) | Waltham, MA USA | bu sunne}!polygen!bill | | | FAX (617)890-8694 | bill@polygen.com | +-----------------+---------------------------+-----------------------------+