X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=driver%2Flock.c;h=ec413aee1a933779522f6b0d9a599bec355382eb;hb=d6b0217f2417bd19187f0ebc389d6c5c2233b11c;hp=564998450828f78af6d9f9375b72795f300c6bf9;hpb=8afc01a67be4fbf3f1cc0fce9adf01b5289a21c6;p=xscreensaver diff --git a/driver/lock.c b/driver/lock.c index 56499845..ec413aee 100644 --- a/driver/lock.c +++ b/driver/lock.c @@ -1,5 +1,5 @@ /* lock.c --- handling the password dialog for locking-mode. - * xscreensaver, Copyright (c) 1993-2014 Jamie Zawinski + * xscreensaver, Copyright (c) 1993-2016 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -487,7 +487,7 @@ make_passwd_window (saver_info *si, * room for the dialog to grow without going off the edge of the screen. */ max_string_width_px *= 0.75; - if (!info_msg && senescent_p()) + if (!info_msg && decrepit_p()) info_msg = ("\n" "This version of XScreenSaver\n" "is very old! Please upgrade!\n"); @@ -534,7 +534,7 @@ make_passwd_window (saver_info *si, /* Measure the info_label. */ if (pw->info_label->overall_width > pw->width) pw->width = pw->info_label->overall_width; - h2 += pw->info_label->overall_height; + h2 += pw->info_label->overall_height; /* Measure the user string. */ XTextExtents (pw->passwd_font, @@ -2193,6 +2193,11 @@ auth_finished_cb (saver_info *si) s = buf; } si->unlock_failures = 0; + + /* ignore failures if they all were too recent */ + if (time((time_t *) 0) - si->unlock_failure_time + < si->prefs.auth_warning_slack) + goto END; } else /* good, with no failures, */ goto END; /* or timeout, or cancel. */