1440N/A # define XtNgreetFace "greetFace"
1440N/A # define XtNfailFace "failFace"
1440N/A # define XtNfailTimeout "failTimeout"
1440N/A+# define XtNgrabDelay "grabDelay"
1440N/A # define XtNsessionArgument "sessionArgument"
1440N/A # define XtNsecureSession "secureSession"
1440N/A # define XtNallowAccess "allowAccess"
1440N/A # define XtCPasswdPrompt "PasswdPrompt"
1440N/A # define XtCFailTimeout "FailTimeout"
1440N/A+# define XtCGrabDelay "GrabDelay"
1440N/A # define XtCSessionArgument "SessionArgument"
1440N/A # define XtCSecureSession "SecureSession"
1440N/A # define XtCAllowAccess "AllowAccess"
1440N/A char *sessionArg; /* argument passed to session */
1440N/A LoginFunc notify_done; /* proc to call when done */
1440N/A int failTimeout; /* seconds til drop fail msg */
1440N/A+ int grabDelay; /* time to retry to set the input focus to the login widget */
1440N/A XtIntervalId interval_id; /* drop fail message note */
1440N/A Boolean secure_session; /* session is secured */
1440N/A Boolean allow_access; /* disable access control on login */
1440N/A (XtPointer) "Password Change Required" },
1440N/A {XtNfailTimeout, XtCFailTimeout, XtRInt, sizeof (int),
1440N/A offset(failTimeout), XtRImmediate, (XtPointer) 10},
1440N/A+ {XtNgrabDelay, XtCGrabDelay, XtRInt, sizeof (int),
1440N/A+ offset(grabDelay), XtRImmediate, (XtPointer) 10},
1440N/A {XtNnotifyDone, XtCCallback, XtRFunction, sizeof (XtPointer),
1440N/A offset(notify_done), XtRFunction, (XtPointer) 0},
1440N/A {XtNsessionArgument, XtCSessionArgument, XtRString, sizeof (char *),
1440N/A+ s = "window is not visible";
1440N/A+ s = "window is no longer valid";
1440N/A+xErrorHandler(Display *d, XErrorEvent *xeep)
1440N/A- XSetInputFocus (XtDisplay (w), XtWindow (w),
1440N/A- RevertToPointerRoot, CurrentTime);
1440N/A+ if (XGrabKeyboard (XtDisplay (w), XtWindow (w), False, GrabModeAsync,
1440N/A+ GrabModeAsync, CurrentTime) != GrabSuccess)
1440N/A+ typedef int (*x_e_h)(Display *, XErrorEvent *);
1440N/A+ x_e_h originalHandler = XSetErrorHandler(xErrorHandler);
1440N/A+ XSetInputFocus (XtDisplay (w), XtWindow (w),
1440N/A+ RevertToPointerRoot, CurrentTime);
1440N/A+ XSync(XtDisplay (w), False);
1440N/A+ if (waitsecs == 0) { /* timed out */
1440N/A+ (void) XSetErrorHandler(originalHandler);
1440N/A+ fprintf(stderr, "%s: failed to set focus; %s\n",
1440N/A+ "greeter", xerrMessage(xerr));
1440N/A /* Returns 0 on success, -1 on failure */
1440N/A #define BS \ /* cpp can be trickier than m4 */
1440N/A #define NLBS \n\ /* don't remove these comments */