http://ftp.x.org/contrib/applications/xscreensaver-3.23.tar.gz
[xscreensaver] / driver / xscreensaver.c
index fc8b89a47e4cd542f838f0e1636503b19b5abc54..9b26390bd6b40c092003ed5e65d192cac371fa42 100644 (file)
@@ -996,6 +996,20 @@ main_loop (saver_info *si)
            si->dbox_up_p = False;
            XDefineCursor (si->dpy, ssi->screensaver_window, ssi->cursor);
            suspend_screenhack (si, False);     /* resume */
+
+            if (!ok_to_unblank &&
+                !screenhack_running_p (si))
+              {
+                /* If the lock dialog has been dismissed and we're not about to
+                   unlock the screen, and there is currently no hack running,
+                   then launch one.  (There might be no hack running if DPMS
+                   had kicked in.  But DPMS is off now, so bring back the hack)
+                 */
+                if (si->cycle_id)
+                  XtRemoveTimeOut (si->cycle_id);
+                si->cycle_id = 0;
+                cycle_timer ((XtPointer) si, 0);
+              }
          }
 #endif /* !NO_LOCKING */
 
@@ -1056,7 +1070,8 @@ main (int argc, char **argv)
   memset(si, 0, sizeof(*si));
   global_si_kludge = si;       /* I hate C so much... */
 
-  srandom ((int) time ((time_t *) 0));
+# undef ya_rand_init
+  ya_rand_init ((int) time ((time_t *) 0));
 
   save_argv (argc, argv);
   set_version_string (si, &argc, argv);