From 1744008413974a2b2d9caf9ffa0a206d3dc863c3 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 14 Dec 2021 10:10:44 +0000 Subject: [PATCH] Windows: Don't send modal input attempts to windows that are explicitly ignoring them --- modules/juce_gui_basics/native/juce_win32_Windowing.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp index 3b0c6dd3ff..ea0c256b20 100644 --- a/modules/juce_gui_basics/native/juce_win32_Windowing.cpp +++ b/modules/juce_gui_basics/native/juce_win32_Windowing.cpp @@ -4033,7 +4033,9 @@ private: return false; if (auto* current = Component::getCurrentlyModalComponent()) - current->inputAttemptWhenModal(); + if (auto* owner = getOwnerOfWindow ((HWND) current->getWindowHandle())) + if (! owner->shouldIgnoreModalDismiss) + current->inputAttemptWhenModal(); return true; }