Something has changed recently when it comes to multiple popup windows. This used to work until I recently did an update to grab the latest version of JUCE. I’m now using v6.0.8-794 on Ubuntu 20.04.
The problem is when calling AlertWindow::showMessageBoxAsync() or AlertWindow::showOkCancelBox(). On startup, our application may create a few windows depending on conditions it finds. If it creates only 1 window, then all is fine. If it creates multiple windows, then there is a “flashing” behaviour that looks like this:
Tried passing in nullptr or the main window as the component. Tried creating the modal callback different ways. Tried different incantations of showOkCancelBox(), and showMessageBoxAsync(). Examples of code I have right now is:
AlertWindow::showMessageBoxAsync(AlertWindow::AlertIconType::InfoIcon,
"DarkMark", "This project has a regex filter:\n\n" + regex_filter);
(Note how there isn’t an async callback in this case, it is used just to display a message.)
And:
AlertWindow::showOkCancelBox(AlertWindow::AlertIconType::QuestionIcon, "DarkMark", msg, "", "", nullptr,
ModalCallbackFunction::create(
[=](int result)
{
if (result == 1)
{
this->import_text_annotations(images_without_json);
}
}));