[comp.sys.amiga] SMART_REFRESH and NOCAREREFRESH

dale@amiga.UUCP (05/09/87)

Setting the NOCAREREFRESH flag in SMARTWINDOWS is not always the
correct thing to do.If the window is sized larger to expose unsaved
bits, the application needs to know that it needs to take some kind
of action to correct this. If NOCAREREFRESH is set you don't get
the REFRESH event.
For example
pm uses the refresh event to redraw the display with a different
scale factor, set by the NEWSIZE event when the window changes size.

Dale Luck

garyo@masscomp.UUCP (05/30/87)

In article <1649@amiga.amiga.UUCP> dale@amiga.UUCP (Dale Luck) writes:
:
:Setting the NOCAREREFRESH flag in SMARTWINDOWS is not always the
:correct thing to do.If the window is sized larger to expose unsaved
:bits...
:
:Dale Luck

Can't you just refresh on the NEWSIZE message?  I thought that's what it's
for; so you just do new size stuff on size change and else don't refresh.

				- Gary Oberbrunner
-- 
Remember,		       -Truth is not beauty;
Information is not knowledge; /	Beauty is not love;	  Gary Oberbrunner
Knowledge is not wisdom;     /	Love is not music;	  ...!masscomp!garyo
Wisdom is not truth;    ----/	Music is the best. - FZ

bryce@COGSCI.BERKELEY.EDU (Bryce Nesbitt) (05/30/87)

[ USENET IS civilized compared to East Oakland. ]
[ Keith -> questions are not under attack, just long sources and multiple,
  repetitive, answers.  sys.amiga volume must drop this way or worse ways ]

In article <> gary@masscomp.UUCP (Gary Oberbrunner) typed:
 In article <> dale@amiga.UUCP (Dale Luck) typed::
>>Setting the NOCAREREFRESH flag in SMARTWINDOWS is not always the
>>correct thing to do.If the window is sized larger to expose unsaved
>>bits...
>Can't you just refresh on the NEWSIZE message?  I thought that's what it's
>for; so you just do new size stuff on size change and else don't refresh.

Yes you can, that's what you are supposed to do.  Not everyone does this...
Here's the problem:  Many people open up a SMART_REFRESH window with 
no special handler code.  When the window changes size they don't care 
(At least not right away).  Some examples are PowerWindows, Funkeys,
some Infocom stories, Procalc and many others.
When their window gets resized they get sent a message, but they don't
have any code to handle it.  The result is that the window is in a
"unresolved" state.  If you take any of these programs, resize the window
and then later pull down and release a menu you will notice that the
borders are refreshed.  With several such windows on the screen it
gets quite slow.

IF YOU OPEN A SMART_REFRESH WINDOW, YOU !!MUST!!:

A> Set the NOCAREREFRESH flag, Intuition won't bother you with refresh
   details on a window resize.  The "unresolved" state will never occur.
   This is the "easy" way out, you won't even need a ICDMP.
-or-
B> Don't set NOCARREFRESH but have handler code that performs a
   BeginRefresh() and EndRefresh() at some point to clear the "unresolved"
   status of the window after resizing. 

See the V1.2 enhancer docs for (slightly) more information on this topic.
Also read the message entitled "con:0/0/640/200/AmigaDOS".

-------------
         Ack!  (NAK,EOT,SOH)
 |\ /|  .
 {o O} .  bryce@cogsci.berkeley.EDU -or- ucbvax!cogsci!bryce
 ( " )    Claimer: These used to be my ideas, but then I gave them to you.
   U      V1.1 disks should have been timestamped to blow up by now so
   everyone is forced to upgrade to V1.2.  V1.2 should be timestamped to
   blow up to guarantee the release of V1.3!  :-) :-} 8-} :-| :->