Hmm. Yes, resizing a component from within a paint() would call repaint() indirectly. Seems like the mac must be clearing the dirty region list at the end of the paint callback, and losing any new regions that were added.
I think it might actually be better to say that repaint() is ok in a paint() callback, and to fix the mac implementation so that it works. I’m not on my mac at the moment, but how about this little change to the order in the mac ComponentPeer:
[code] if (context.reduceClipRegion (regionsNeedingRepaint))
{
regionsNeedingRepaint.clear();
if (! peer->getComponent()->isOpaque())
{
for (RectangleList::Iterator i (*context.getRawClipRegion()); i.next();)
{
const Rectangle& r = i.getRectangle();
image->clear (r.getX(), r.getY(), r.getWidth(), r.getHeight());
}
}
regionsNeedingRepaint.clear();
peer->clearMaskedRegion();
peer->handlePaint (context);
}
else
{
regionsNeedingRepaint.clear();
}
[/code]