Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!rice!uw-beaver!mit-eddie!xn.ll.mit.edu!xn!haydens From: haydens@natasha.juliet.ll.mit.edu (Hayden Schultz) Newsgroups: comp.windows.open-look Subject: Re: OLWM exit questions Message-ID: Date: 1 May 91 20:37:21 GMT References: <1991Apr29.070633.6567@agora.rain.com> Sender: usenet@xn.ll.mit.edu Organization: M.I.T. Lincoln Lab - Group 42 Lines: 43 In-Reply-To: bobb@agora.rain.com's message of 29 Apr 91 07:06:33 GMT In article <1991Apr29.070633.6567@agora.rain.com> bobb@agora.rain.com (Bob Beauchemin) writes:1z Path: xn.ll.mit.edu!mit-eddie!rutgers!uwm.edu!ogicse!intelhf!agora!bobb From: bobb@agora.rain.com (Bob Beauchemin) Newsgroups: comp.windows.open-look Date: 29 Apr 91 07:06:33 GMT Sender: bobb@agora.rain.com (Bob Beauchemin) Organization: Open Communications Forum Lines: 48 Patricia Rodriguez-Tome asks: >Is there a way to change the text of the notice we get when choosing >Exit from the Workspace Menu? > >(the text is : Please confirm exit from the window system ) > The "Please confirm..." message is hard-coded in module services.c. When a user chooses Exit through the menu the routine ExitFunc in services.c is called. You can change the "exit" behavior here. When a user answers "exit" to the message, control is currently passed to a routine called Exit() in module olwm.c. This kills all the clients and terminates OLWM. You can change the behavior of ExitFunc() or Exit() to do what you would like and/or change the "Please confirm..." message. There is no need to code your own signal-catcher. In the module olwm.c OLWM sets up a signal catcher for SIGHUP, SIGTERM and SIGINT to go to a routine (in olwm.c) called ExitOLWM. This exits the window manager without killing all the clients. You can modify this routine if you wish. Using Bob Beauchemin`s info, you could write your own program which puts up a window with a panel with text and buttons. When the user presses the "Kill the window system, not the application" button, the program sends a SIGTERM (or SIGUP or SIGINIT) to the server. Then, put the invocation to your program in the user's menu (in .openwin-menu) in place of EXIT. This won't work with all OpenWindows messages, but it should solve the original problem. Hayden Schultz (haydens@juliet.ll.mit.edu) MIT Lincoln Lab