summaryrefslogtreecommitdiffstats
path: root/driver/timers.c
diff options
context:
space:
mode:
authorSimon Rettberg2020-12-02 08:23:52 +0100
committerSimon Rettberg2020-12-02 08:23:52 +0100
commit2954208d00d422b34fa3a69631b0a091f17a349d (patch)
treeb4322e320155656af133b8f47025d00b17a68f64 /driver/timers.c
parentUpdate to 5.43 (diff)
downloadxscreensaver-2954208d00d422b34fa3a69631b0a091f17a349d.tar.gz
xscreensaver-2954208d00d422b34fa3a69631b0a091f17a349d.tar.xz
xscreensaver-2954208d00d422b34fa3a69631b0a091f17a349d.zip
5.44
Diffstat (limited to 'driver/timers.c')
-rw-r--r--driver/timers.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/driver/timers.c b/driver/timers.c
index ea97f34..5aa568c 100644
--- a/driver/timers.c
+++ b/driver/timers.c
@@ -1,5 +1,5 @@
/* timers.c --- detecting when the user is idle, and other timer-related tasks.
- * xscreensaver, Copyright (c) 1991-2017 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1991-2019 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -311,6 +311,12 @@ activate_lock_timer (XtPointer closure, XtIntervalId *id)
if (p->verbose_p)
fprintf (stderr, "%s: timed out; activating lock.\n", blurb());
+
+ if (!si->locked_p)
+ /* So that "xscreensaver-command -watch" reports the time that the
+ screen was locked, instead of duplicating the blank time. */
+ si->blank_time = time ((time_t *) 0);
+
set_locked_p (si, True);
}