From 4c95897ad3cd8fa73e96763885ffa6fa05dda396 Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 21 Sep 2021 13:46:54 +0100 Subject: [PATCH] XWindowSystem: Only dismiss transient modal windows when other windows are moved or resized --- .../juce_gui_basics/native/x11/juce_linux_XWindowSystem.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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