diff options
author | Simon Rettberg | 2020-12-02 08:35:55 +0100 |
---|---|---|
committer | Simon Rettberg | 2020-12-02 08:35:55 +0100 |
commit | e5319b91d163384ee22db077b2d37688d65646c9 (patch) | |
tree | 04acbf822516634814098b38a9878ffc1a55529d /driver/xscreensaver.c | |
parent | driver/timers.c: fix flush_events() (diff) | |
parent | 5.44 (diff) | |
download | xscreensaver-e5319b91d163384ee22db077b2d37688d65646c9.tar.gz xscreensaver-e5319b91d163384ee22db077b2d37688d65646c9.tar.xz xscreensaver-e5319b91d163384ee22db077b2d37688d65646c9.zip |
Merge branch 'master' into openslx
Diffstat (limited to 'driver/xscreensaver.c')
-rw-r--r-- | driver/xscreensaver.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/driver/xscreensaver.c b/driver/xscreensaver.c index 0ecb6ec..b9c54f1 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 @@ -1569,6 +1574,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); @@ -1598,6 +1604,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 @@ -1912,13 +1920,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); |