From b2b8df282aac71da923a352ef84dc76c6a6136cb Mon Sep 17 00:00:00 2001 From: Alexander Melkov Date: Mon, 27 Mar 2023 07:18:44 +0300 Subject: [PATCH] Resolves #475 Terminal window stops updating after resuming from sleep --- 0.76_My_PuTTY/timing.c | 4 +++- 0.76b_My_PuTTY/timing.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/0.76_My_PuTTY/timing.c b/0.76_My_PuTTY/timing.c index 8036e43..3e116a8 100644 --- a/0.76_My_PuTTY/timing.c +++ b/0.76_My_PuTTY/timing.c @@ -137,10 +137,12 @@ unsigned long schedule_timer(int ticks, timer_fn_t fn, void *ctx) } first = (struct timer *)index234(timers, 0); - if (first == t) { + if (first == t || first != NULL && first->now + 10 * (TICKSPERSEC) < now) { /* * This timer is the very first on the list, so we must * notify the front end. + * Also notify if the first timer has seriously missed its run time, + * most likely due to a system sleep event. */ timer_change_notify(first->now); } diff --git a/0.76b_My_PuTTY/timing.c b/0.76b_My_PuTTY/timing.c index 8036e43..3e116a8 100644 --- a/0.76b_My_PuTTY/timing.c +++ b/0.76b_My_PuTTY/timing.c @@ -137,10 +137,12 @@ unsigned long schedule_timer(int ticks, timer_fn_t fn, void *ctx) } first = (struct timer *)index234(timers, 0); - if (first == t) { + if (first == t || first != NULL && first->now + 10 * (TICKSPERSEC) < now) { /* * This timer is the very first on the list, so we must * notify the front end. + * Also notify if the first timer has seriously missed its run time, + * most likely due to a system sleep event. */ timer_change_notify(first->now); }