Since Big Sur our application locks up when the user chooses to set the MainWindow to fullscreen using the green ‘fullscreen’ button using the native title bar.
The lock up only happens when the MessageThread is quite busy.
So to rule out it’s actually our own code that is causing this i created a basic GUI application (straight out of the Projucer with the latest version of JUCE v6.0.7) and added some code it to trigger this behaviour.
I modified the paint routine to draw 500 rectangles, i set a Timer to fire at 15hz to cause frequent repaints (to be honest on my machine the Timer isn’t even needed it locks up without it as well). When you press the green ‘fullscreen’ button the whole screen goes black and the Window which has a red background will stay in the middle, see attached screenshot. If i only draw 1 rectangle it works fine and the result is a red window covering the whole screen without window decorations.
So to be very clear, this is vanilla JUCE GUI app, straight from the Projucer with the latest version. No extra code added whatsoever. Please have a look at this a.s.a.p, because this is a serious issue.
//==============================================================================
MainComponent::MainComponent()
{
setSize (600, 400);
startTimerHz(15);
}
MainComponent::~MainComponent()
{
}
//==============================================================================
void MainComponent::paint (juce::Graphics& g)
{
// (Our component is opaque, so we must completely fill the background with a solid colour)
g.fillAll (getLookAndFeel().findColour (juce::ResizableWindow::backgroundColourId));
g.setFont (juce::Font (16.0f));
g.setColour (juce::Colours::white);
g.drawText ("Hello World!", getLocalBounds(), juce::Justification::centred, true);
for (int i=0; i<500;i++)
{
g.setColour(juce::Colours::red);
g.fillRect(getLocalBounds());
}
}
void MainComponent::resized()
{
// This is called when the MainComponent is resized.
// If you add any child components, this is where you should
// update their positions.
}
void MainComponent::timerCallback()
{
repaint();
}