Listing 3. WM_SAVE_YOURSELF Setup

dpy   = XtDisplay(topLevel);

   save = XmInternAtom(dpy, "WM_SAVE_YOURSELF",
       False);

   XmAddWMProtocols(topLevel, &save, 1);

   XmAddWMProtocolCallback(topLevel, &save,
      saveProc, topLevel);