-#ifdef HAVE_ATHENA
-
-void
-pop_up_athena_dialog_box (Widget parent, Widget focus, Widget dialog,
- Widget form, int where)
-{
- /* modified from demo.c */
- /* I'm sure this is the wrong way to pop up a dialog box, but I can't
- figure out how else to do it.
-
- It's important that the screensaver dialogs not get decorated or
- otherwise reparented by the window manager, because they need to be
- children of the *real* root window, not the WM's virtual root, in
- order for us to guarentee that they are visible above the screensaver
- window itself.
- */
- Arg av [100];
- int ac = 0;
- Dimension sw, sh, x, y, w, h;
-
- XtRealizeWidget(dialog);
- sw = WidthOfScreen (XtScreen (dialog));
- sh = HeightOfScreen (XtScreen (dialog));
- ac = 0;
- XtSetArg (av [ac], XtNwidth, &w); ac++;
- XtSetArg (av [ac], XtNheight, &h); ac++;
- XtGetValues (form, av, ac);
- switch (where)
- {
- case 0: /* center it in the top-right quadrant */
- x = (sw/2 + w) / 2 + (sw/2) - w;
- y = (sh/2 + h) / 2 - h;
- break;
- case 1: /* center it in the bottom-right quadrant */
- x = (sw/2 + w) / 2 + (sw/2) - w;
- y = (sh/2 + h) / 2 + (sh/2) - h;
- break;
- case 2: /* center it on the screen */
- x = (sw + w) / 2 - w;
- y = (sh + h) / 2 - h;
- break;
- default:
- abort ();
- }
- if (x + w > sw) x = sw - w;
- if (y + h > sh) y = sh - h;
- ac = 0;
- XtVaSetValues(dialog,
- XtNx, x,
- XtNy, y,
- NULL);
- XtVaSetValues(form,
- XtNx, x,
- XtNy, y,
- NULL);
- XtPopup(dialog,XtGrabNone);
- steal_focus_and_colormap (focus);
-}
-
-static void
-passwd_set_label (char *buf, int len)
-{
- Widget label;
- if (!passwd_text)
- return;
- label=XtNameToWidget(XtParent(passwd_text),"*label");
- XtVaSetValues(label,
- XtNlabel, buf,
- NULL);
-}
-#endif /* HAVE_ATHENA */
-