From 2eb52cbfe33171eda83b69d9df36cee0ff834f33 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Thu, 6 Feb 2020 07:31:41 -0700 Subject: * Fix a bug in PC-Alpine that made Alpine go into an infinte loop and consume CPU when it was iconized. Reported by Holger Schieferdecker in comp.mail.pine. --- pico/osdep/mswin.c | 12 ++++++++++-- pith/pine.hlp | 9 ++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pico/osdep/mswin.c b/pico/osdep/mswin.c index 76d358ba..824ccd4c 100644 --- a/pico/osdep/mswin.c +++ b/pico/osdep/mswin.c @@ -1992,8 +1992,14 @@ PaintTTY (HWND hWnd) if (pTTYInfo == NULL) return (FALSE); - if (IsIconic (hWnd)) - return (TRUE); + // There used to be an instruction to return when we were iconized: + // if (IsIconic (hWnd)) + // return (TRUE); + // We remove this, because when Windows wants to update the screen + // and Alpine returns because the screen is iconized,, neither Windows + // nor Alpine will stop their vicious infinite cycle: Windows trying to + // force the update and Alpine avoiding it. We better yield because + // otherwise we will end up with a high consumption of CPU. hDC = BeginPaint (hWnd, &ps); rect = ps.rcPaint; @@ -6736,6 +6742,7 @@ mswin_caninput (void) int mswin_charavail (void) { + DWORD start; MSG msg; BOOL ca, pa, ma; @@ -6788,6 +6795,7 @@ mswin_charavail (void) UCS mswin_getc (void) { + DWORD start; BOOL ca, pa, ma; MSG msg; diff --git a/pith/pine.hlp b/pith/pine.hlp index 4f0eb38f..dd4ca9ac 100644 --- a/pith/pine.hlp +++ b/pith/pine.hlp @@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any reasonable place to be called from. Dummy change to get revision in pine.hlp ============= h_revision ================= -Alpine Commit 402 2020-02-03 21:15:05 +Alpine Commit 403 2020-02-06 07:31:37 ============= h_news ================= @@ -196,6 +196,13 @@ any problems you find with this release. New enhancements reply is enabled. Reported and patched by Peter Tirsek. +

Bug fixes include +

+

Version () addresses bugs found in previous releases and has a few additions as well. -- cgit v1.2.3-70-g09d2