Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!paperboy!osf.org!dbrooks From: dbrooks@osf.org (David Brooks) Newsgroups: comp.windows.x.motif Subject: Re: How do I kill the window menu? (was Re: Ignore my last posting...) Keywords: MOTIF Message-ID: <11483@paperboy.OSF.ORG> Date: 31 Jul 90 20:50:38 GMT References: <12399@rouge.usl.edu> <632@dg.dg.com> <863@airgun.wg.waii.com> <11442@paperboy.OSF.ORG> Sender: news@OSF.ORG Reply-To: dbrooks@osf.org (David Brooks) Organization: Open Software Foundation Lines: 30 In article <12399@rouge.usl.edu>, gat@gator.cacs.usl.edu (Gary Thompson) writes: > I am currently helping develop an application and I > would like to be able to properly disable the window menu to keep the users > from closing dialogs without my program's knowledge. Could you tell me how to > go about doing this via the "protocol stuff" ? > If you're talking about dialogs, closing them is quite a natural act and simply unmanages them, removing them from the screen but not otherwise hurting your application. You *can* be notified with the popdown callback (of the shell, not the messagebox or whatever). For a primary window, if you simply want your user not to be able to close it, you can do this with a shell resource. Use: Mwm*Class.clientFunctions: -close or: Class*mwmFunctions: 33 Sorry about the magic number. Or (in 1.0.3 and up) set the resource XmNmwmFunctions to MWM_FUNC_ALL | MWM_FUNC_CLOSE, which is where the 33 comes from. Using protocols to cause a callback when "Kill" is selected is described in the mwm part of the OSF/Motif Programmer's Guide. -- David Brooks dbrooks@osf.org Systems Engineering, OSF uunet!osf.org!dbrooks