summaryrefslogtreecommitdiffstats
path: root/driver/xscreensaver.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/xscreensaver.c
parentUpdate to 5.43 (diff)
downloadxscreensaver-2954208d00d422b34fa3a69631b0a091f17a349d.tar.gz
xscreensaver-2954208d00d422b34fa3a69631b0a091f17a349d.tar.xz
xscreensaver-2954208d00d422b34fa3a69631b0a091f17a349d.zip
5.44
Diffstat (limited to 'driver/xscreensaver.c')
-rw-r--r--driver/xscreensaver.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/driver/xscreensaver.c b/driver/xscreensaver.c
index 2add3b8..40f8207 100644
--- a/driver/xscreensaver.c
+++ b/driver/xscreensaver.c
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-2019 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1991-2020 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
@@ -443,6 +443,11 @@ saver_ehandler (Display *dpy, XErrorEvent *error)
}
+#ifdef __GNUC__ /* Silence warning */
+static void startup_ehandler (String, String, String, String, String *,
+ Cardinal *) __attribute__((noreturn));
+#endif /* __GNUC__ */
+
/* This error handler is used only while the X connection is being set up;
after we've got a connection, we don't use this handler again. The only
reason for having this is so that we can present a more idiot-proof error
@@ -1561,6 +1566,7 @@ main (int argc, char **argv)
if (ssi->real_screen_p)
if (ensure_no_screensaver_running (si->dpy, si->screens[i].screen))
exit (1);
+ ssi->current_hack = -1;
}
lock_initialization (si, &argc, argv);
@@ -1590,6 +1596,8 @@ main (int argc, char **argv)
initialize_stderr (si);
handle_signals (si);
+ store_saver_status (si); /* for xscreensaver-command -status */
+
# ifdef HAVE_LIBSYSTEMD /* Launch it in the background */
si->systemd_pid = fork_and_exec_1 (si, 0, "xscreensaver-systemd");
# endif
@@ -1904,13 +1912,13 @@ handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p)
"suspending.");
si->selection_mode = 0;
si->demoing_p = False;
- si->emergency_lock_p = True;
si->throttled_p = True;
/* When suspending, immediately lock, if locking enabled. */
# ifndef NO_LOCKING
if (p->lock_p && !si->locked_p && !si->locking_disabled_p)
{
+ si->emergency_lock_p = True;
if (p->verbose_p)
fprintf (stderr, "%s: locking.\n", blurb());
set_locked_p (si, True);