Switching workspace in Gnome exits modal dialogs

Easy to reproduce with DemoRunner: launch the DialogsDemo , show the callout box or the thread with progress dialog, and switch to another workspace (ctrl-alt-up / down), when you come back to DemoRunner, the modal dialog has been dismissed.

Here is the stack trace I get when the dialog is dismissed – this is with the develop branch, but it is not a recent issue, it has been there for a long time, it seems.

juce::ModalComponentManager::ModalItem::cancel() +0xb0
juce::Component::sendVisibilityChangeMessage() +0x72
juce::ComponentPeer::handleMovedOrResized() +0x1a1
juce::XWindowSystem::handleConfigureNotifyEvent(juce::LinuxComponentPeer*, XConfigureEvent&) const +0x29
juce::XWindowSystem::handleWindowMessage(juce::LinuxComponentPeer*, _XEvent&) const +0x118
std::_Function_handler<void (int), juce::XWindowSystem::initialiseXDisplay()::{lambda(int)#1}>::_M_invoke(std::_Any_data const&, int&&) +0x2eb
juce::InternalRunLoop::dispatchPendingEvents() +0xb5

I think it is a consequence of this change: BR: Menus don't disappear when app minimized - #3 by reuk