[comp.sys.amiga.tech] YARB - Yet another refresh bug ?

gay@elde.epfl.ch (David Gay) (03/06/89)

Another problem with BeginRefresh/EndRefresh (I thrive on them :-)):

There seems to be a problem with calling SetWindowTitles during a refresh.
This can cause Intuition to freeze up. I have a function that redraws the
screen, called during refresh. This function does a SetWindowTitles. I was
using a SIMPLE_REFRESH window, and you get a window refresh request every
time you select options from the menu. With the SetWindowTitles call
present, if you try and select the menus again(before the refresh is done),
you get the usual interlock symptoms (frozen mouse pointer).

Any suggestions as to workarounds would be greatly appreciated (for the
moment, I simply don't set the title during refresh).


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
David Gay                                  6 x 9 = 42

GAY@ELDE.EPFL.CH, or GAY%ELDE.EPFL.CH@CLSEPF51.bitnet

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cmcmanis%pepper@Sun.COM (Chuck McManis) (03/07/89)

In article <890305224442.20c00bb5@elcc.epfl.ch> (David Gay) writes:
> Another problem with BeginRefresh/EndRefresh (I thrive on them :-)):
>
> There seems to be a problem with calling SetWindowTitles during a refresh.

I may have missed something here, but in general it is _illegal_ to call
an Intuition Window function whilst between a BeginRefresh() and an
EndRefresh(). All you can do is call graphics kinds of things that 
draw in your window. If you want to refresh the border (and title) 
you can do so _after_ the refresh by calling RedrawWindowFrame().


--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses, but you knew that didn't you.

papa@pollux.usc.edu (Marco Papa) (03/07/89)

In article <92676@sun.uucp> cmcmanis@sun.UUCP (Chuck McManis) writes:
|In article <890305224442.20c00bb5@elcc.epfl.ch| (David Gay) writes:
|| Another problem with BeginRefresh/EndRefresh (I thrive on them :-)):
|| There seems to be a problem with calling SetWindowTitles during a refresh.
|
|I may have missed something here, but in general it is _illegal_ to call
|an Intuition Window function whilst between a BeginRefresh() and an
|EndRefresh(). All you can do is call graphics kinds of things that 
|draw in your window. If you want to refresh the border (and title) 
|you can do so _after_ the refresh by calling RedrawWindowFrame().

Chuck is quite right.  This is a direct quote from the 1.2 Enhancer Manual:

"When using Begin/EndRefresh(), restrict your operations to simple rendering.
Avoid calls that may lock the LayerInfo, or get complicated in Intuition, 
since BeginRefresh() leaves the window's layers(s) locked.".

-- Marco Papa 'Doc'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
uucp:...!pollux!papa       BIX:papa       ARPAnet:pollux!papa@oberon.usc.edu
 "There's Alpha, Beta, Gamma and Diga!" -- Leo Schwab [quoting Rick Unland]
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=