diff --git a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp index 4e38e7ed82..a4e01fd277 100644 --- a/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp +++ b/modules/juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp @@ -3544,7 +3544,9 @@ void XWindowSystem::dismissBlockingModals (LinuxComponentPeer* peer) const { if (peer->getComponent().isCurrentlyBlockedByAnotherModalComponent()) if (auto* currentModalComp = Component::getCurrentlyModalComponent()) - currentModalComp->inputAttemptWhenModal(); + if (auto* otherPeer = currentModalComp->getPeer()) + if ((otherPeer->getStyleFlags() & ComponentPeer::windowIsTemporary) != 0) + currentModalComp->inputAttemptWhenModal(); } void XWindowSystem::handleConfigureNotifyEvent (LinuxComponentPeer* peer, XConfigureEvent& confEvent) const