Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site uw-beaver
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!houxm!vax135!cornell!uw-beaver!info-mac
From: info-mac@uw-beaver
Newsgroups: fa.info-mac
Subject: Re: Behaviour of InvalRect
Message-ID: <238@uw-beaver>
Date: Mon, 17-Dec-84 23:07:05 EST
Article-I.D.: uw-beave.238
Posted: Mon Dec 17 23:07:05 1984
Date-Received: Wed, 19-Dec-84 02:28:21 EST
Sender: daemon@uw-beaver
Organization: U of Washington Computer Science
Lines: 26

From: kato.SV@XEROX.ARPA

OK. Let's see if I've got it right this time. InvalRect just adds the
AREA of the rectangle to the update region and doesn't affect any kind
of drawing in it. The update event is NOT generated at that time. I have
a feeling it's generated by SystemTask seeing that a window's update
region is not empty. For this much I thank Art Pope, Ben Hyde, and
Robert White.

Now, I still have the problem that when I make a text window grow, the
text gets re-drawn in the window, but any old text on later lines does
not get erased. There is a global variable called paintWhite that should
be set to erase the window's update region BEFORE an update event is
generated. IM even asserts that several window manager routines set this
flag so if you want it cleared, you should keep re-clearing it. In my
code I call InvalRect with the portrect of the window, then call
Sizewindow with fUpdate true, then call TECalc. The InvalRect adds the
old rectangle to the update region, Sizewindow adds any new area to the
update region, therefore the update region should be set to the whole
window. If indeed paintWhite is set, the whole window should be erased
and I'd have no problem. It looks like IM is wrong. PaintWhite is NOT
set by default.

I will check it this weekend.

Kato.sv@Xerox.arpa