summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-02-06 07:31:41 -0700
committerEduardo Chappa <chappa@washington.edu>2020-02-06 07:31:41 -0700
commit2eb52cbfe33171eda83b69d9df36cee0ff834f33 (patch)
tree7a6409b650961475ede1484f47274508cce2082f
parentdba6c62a11eed30f7a4e3e625eec8ca88252ab6c (diff)
downloadalpine-2eb52cbfe33171eda83b69d9df36cee0ff834f33.tar.xz
* 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.
-rw-r--r--pico/osdep/mswin.c12
-rw-r--r--pith/pine.hlp9
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 =================
<HTML>
<HEAD>
@@ -196,6 +196,13 @@ any problems you find with this release. New enhancements
reply is enabled. Reported and patched by Peter Tirsek.
</UL>
+<P> Bug fixes include
+<UL>
+<LI>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.
+</UL>
+
<P>
Version <!--#echo var="ALPINE_VERSION"--> (<!--#echo var="ALPINE_REVISION"-->)
addresses bugs found in previous releases and has a few additions as well.