Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!jarthur!uunet!ebt-inc!ebt-inc.uucp!jlv From: jlv@ebt-inc.uucp (Jeffrey L. Vogel) Newsgroups: comp.windows.x Subject: WM_DELETE and the Shell Widget Message-ID: <224@ebt-inc.UUCP> Date: 17 Dec 90 14:08:01 GMT Sender: jlv@ebt-inc.UUCP Organization: Electronic Book Technologies, Providence RI Lines: 25 I am having the following problem with the XtR4 Shell Widget. I want to know when the user, via the window manager, requested that my shell be closed. I don't, however, want the shell to be destroyed, just unmapped. So, this is what I did. 1) selected WM_DELETE properties with XSetWMProtocols. 2) Used XtAddEventHandler to register for the ClientMessage events. 3) In the callback I issued a XWithdrawWindow request to the window manager to unmap the window and its icon, as the ICCCM says I should. I believe that the window and widget should not be destroyed unless I explicitly destroy them. Well... I noticed weird things happening to my application after I got my ClientMessage from the Window Manger. SO, I register with the ShellWidget for a XtNdestroyCallback, and sure enough, I was getting called. Apparently, the Xt Shell Widget is getting these messages from the window manager also, and taking it upon itself to destroy itself. Is this TRUE, if so, how can it be stopped?