Closed mthierman closed 12 months ago
i'm so sorry i haven't had a moment to get into windows and review your pr. I will later in the week. apols - some personal stuff has me away from my desk and on laptop.
I think, though the fix is to give the window a temporary size before it is resized when it is added to desktop
#elif JUCE_WINDOWS
impl->editor->setVisible(false);
impl->editor->setOpaque(true);
impl->editor->setTopLeftPosition(0, 0);
impl->editor->addToDesktop(0, (void *)window->win32);
impl->editor->setVisible(true);
return true;
#else
that's the code in clap_juce_shim_impl.cpp around line 120.
I bet if before the addToDesktop we did an impl->editor->setSize(1,1,) the assert would vanish. And then we just need to figure out the right moment to get the size and stuff.
i'm so sorry i haven't had a moment to get into windows and review your pr. I will later in the week. apols - some personal stuff has me away from my desk and on laptop.
No worries!
I think, though the fix is to give the window a temporary size before it is resized when it is added to desktop
#elif JUCE_WINDOWS impl->editor->setVisible(false); impl->editor->setOpaque(true); impl->editor->setTopLeftPosition(0, 0); impl->editor->addToDesktop(0, (void *)window->win32); impl->editor->setVisible(true); return true; #else
that's the code in clap_juce_shim_impl.cpp around line 120.
I bet if before the addToDesktop we did an impl->editor->setSize(1,1,) the assert would vanish. And then we just need to figure out the right moment to get the size and stuff.
Thanks, I had to setSize and change setOpaque, still jassert but in a different place now. Will keep digging.
isOpaque() returns true like it should, no problem there. getBounds().isEmpty()
always returns false, I can't tell why, doesn't seem to matter where I call setSize() either.
Ahh the issue is actually way simpler now i got windows booted
basically: we add the EditorBase directly to the window with no intermediate component. (The shim should not do this and it is why we don't have a place to put our transform for setscale). But the editor base also doesn't implement paint.
If I add
void paint(juce::Graphics &g)
{
g.fillAll(juce::Colours::black);
}
to editor-base.h then the problem goes away.
I'll get that committed today along with reviewing the windows standalone, now I'm finally booted into windows.
should be all fixed now with the new clap-juce-shim
Tested in Reaper (VST3 & CLAP) and experimental windows standalone from clap-wrapper