With the latest tip, there are some really nasty repainting issues when resizing the 32-bit VST UI on Ableton Live for Mac. This is easily reproduced with the JuceDemoPlugin - just grab the handle and resize the window. See the attached screenshot for an example.
I am getting the same thing with Mac Live 9 VST 64 bit of Juce plugins, the VST version doesn't redraw properly when you drag the resizer quickly larger. The AU works fine. Any ideas?
It looks to me that only one additional repaint is needed after the resizing, i.e. the plug-in always repaints according to the previous window size while resizing. This means that if you drag the resize icon slowly, the repainting of the plug-in is nearly correct (apart from 1px). Can you confirm that this is the bug you are seeing? Am I missing a more severe bug?
Hi Fabian, thanks for looking into this. Yes, moving the resizer fast makes issues worse. I already tried firing off a repaint and it didin't fix the issue. Can you please tell me the line of code you changed, or perhaps the commit message so I can track down what changed?
So it is working, but it also triggers a debug assertion:
void Component::setBounds (const int x, const int y, int w, int h)
{
// if component methods are being called from threads other than the message
// thread, you'll need to use a MessageManagerLock object to make sure it's thread-safe.
ASSERT_MESSAGE_MANAGER_IS_LOCKED_OR_OFFSCREEN
if (w < 0) w = 0;
if (h < 0) h = 0;
const bool wasResized = (getWidth() != w || getHeight() != h);
const bool wasMoved = (getX() != x || getY() != y);
#if JUCE_DEBUG
// It's a very bad idea to try to resize a window during its paint() method!
jassert (! (flags.isInsidePaintCall && wasResized && isOnDesktop()));
#endif
...
}
I also found an identical redraw problem in the AAX plugin, where an extra repaint is needed to get the plugin to draw properly after a resize larger (edit: running on Mac OS 10.10, PT 11.2.1 Dev build)