home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / osf / osf1 / 64 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.8 KB

  1. Xref: sparky comp.unix.osf.osf1:64 comp.windows.x.motif:8868
  2. Newsgroups: comp.unix.osf.osf1,comp.windows.x.motif
  3. Path: sparky!uunet!walter!porthos!iscp.bellcore.com!wws
  4. From: wws@iscp.bellcore.com (Wayne Scott)
  5. Subject: problem trapping Motif Close function on DEC Alpha 
  6. Organization: Bellcore
  7. Distribution: usa
  8. Date: Tue, 26 Jan 93 16:15:32 GMT
  9. Message-ID: <1993Jan26.161532.28165@porthos.cc.bellcore.com>
  10. Sender: netnews@porthos.cc.bellcore.com (USENET System Software)
  11. Lines: 32
  12.  
  13. Hello:
  14.  
  15.     I have an application in which I'm trying to trap the Motif Close
  16. function to post a confirmation box before stopping.  I run it on a DEC Alpha
  17. system with OSF/1.  When I display it on an Alpha workstation, selecting the
  18. Close menu item kills the application.  When I display it on a DECstation 5000,
  19. the Close function is trapped and my confirmation box is displayed.
  20. Is this a bug on the Alpha or do I need to do something new?  Our system
  21. administrator thinks we're running X11R5 on the Alpha; X11R4 is on the 5000.
  22. Is there anything wrong with this code?
  23.  
  24.         XtRealizeWidget( appShell );
  25.  
  26.         /*
  27.         // The following lines of code disables the default behavior of
  28.         // the process when the Motif "Close" is selected, and instead
  29.         // calls the function stopMocCB().
  30.         */
  31.  
  32.         /*
  33.         *** THIS IS BROKEN ON THE ALPHA PLATFORM ***
  34.         */
  35.         XtSetArg(args[0], XmNdeleteResponse, XmDO_NOTHING);
  36.         XtSetValues(appShell, args, (Cardinal) 1);
  37.         wmDeleteWindow = XmInternAtom(XtDisplay(appShell),
  38.                                         "WM_DELETE_WINDOW", False);
  39.         XmAddWMProtocolCallback(appShell, wmDeleteWindow,
  40.                                 (XtCallbackProc) stopMocCB,
  41.                                 (caddr_t) appShell);
  42.  
  43. Thank you,
  44. Wayne Scott
  45.