home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.osf.osf1:64 comp.windows.x.motif:8868
- Newsgroups: comp.unix.osf.osf1,comp.windows.x.motif
- Path: sparky!uunet!walter!porthos!iscp.bellcore.com!wws
- From: wws@iscp.bellcore.com (Wayne Scott)
- Subject: problem trapping Motif Close function on DEC Alpha
- Organization: Bellcore
- Distribution: usa
- Date: Tue, 26 Jan 93 16:15:32 GMT
- Message-ID: <1993Jan26.161532.28165@porthos.cc.bellcore.com>
- Sender: netnews@porthos.cc.bellcore.com (USENET System Software)
- Lines: 32
-
- Hello:
-
- I have an application in which I'm trying to trap the Motif Close
- function to post a confirmation box before stopping. I run it on a DEC Alpha
- system with OSF/1. When I display it on an Alpha workstation, selecting the
- Close menu item kills the application. When I display it on a DECstation 5000,
- the Close function is trapped and my confirmation box is displayed.
- Is this a bug on the Alpha or do I need to do something new? Our system
- administrator thinks we're running X11R5 on the Alpha; X11R4 is on the 5000.
- Is there anything wrong with this code?
-
- XtRealizeWidget( appShell );
-
- /*
- // The following lines of code disables the default behavior of
- // the process when the Motif "Close" is selected, and instead
- // calls the function stopMocCB().
- */
-
- /*
- *** THIS IS BROKEN ON THE ALPHA PLATFORM ***
- */
- XtSetArg(args[0], XmNdeleteResponse, XmDO_NOTHING);
- XtSetValues(appShell, args, (Cardinal) 1);
- wmDeleteWindow = XmInternAtom(XtDisplay(appShell),
- "WM_DELETE_WINDOW", False);
- XmAddWMProtocolCallback(appShell, wmDeleteWindow,
- (XtCallbackProc) stopMocCB,
- (caddr_t) appShell);
-
- Thank you,
- Wayne Scott
-