+
+ /* When should we allow blanking to proceed? The current theory
+ is that a keyboard grab is manditory; a mouse grab is optional.
+
+ - If we don't have a keyboard grab, then we won't be able to
+ read a password to unlock, so the kbd grab is manditory.
+ (We can't conditionalize this on locked_p, because someone
+ might run "xscreensaver-command -lock" at any time.)
+
+ - If we don't have a mouse grab, then we might not see mouse
+ clicks as a signal to unblank -- but we will still see kbd
+ activity, so that's not a disaster.
+ */
+
+ if (kstatus != GrabSuccess) /* Do not blank without a kbd grab. */
+ return False;
+
+ return True; /* Grab is good, go ahead and blank. */