From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10b6ac,38a92f8fa7e1a144 X-Google-Attributes: gid10b6ac,public X-Google-Thread: fee84,38a92f8fa7e1a144 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1993-01-26 08:15:32 PST 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) 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