I've put this in Reaction forum but it would equaly apply to Intuition I suppose.
Since quite some time AmigaOS4 windows resize with their contents by default. This is completely fine if you have a window that only contains gadgets and all those gadgets are laid out by the containing layout gadgets.
However if you are rendering your own content, when you respond to a IDCMP_NEWSIZE event by rerendering your content to suit the new window size, it's very easy to get caught out and render over the window borders, because whilst you were making you calculations, the window changed size again! You usually that happens when the user is reducing the winsdow in size quickly.
I first came across this with AWeb and fixed that by simply avoiding the problem and switching off resizing with content for AWeb windows (overiding the user preference)
I also have the problem in SketchBlock, and as the contents in SketchBlock render relatively slowly (if you have a large project anyway) the effect is very noticable. I've solved it in sketchblock by coding a specific "sketchgadget" which is a subclass of the space gadget and handles any rerendering on window size changes, but it's complex and I'm not happy that it;s the best solution.
I'm experiencing it in new app where I need to "manually layout" a bitmap image, the source of which might be quite large so it's slow to scale and will overwrite the window when I redice it in size moderatly quickly.
So how then do you avoid this issue in the "correct manner" and retain resize with content?
Mon, 2012-08-13 21:35
#1
How to avoid rendering over widnow borders when you window sized is changed. ??
Author of the PortablE programming language. I love using Amiga OS4.1 on my X1000 & Sam440 :-D