From 245e2116c37397a09c4a22215f2d9588dcaffdd3 Mon Sep 17 00:00:00 2001 From: jules Date: Thu, 25 Sep 2008 16:35:53 +0000 Subject: [PATCH] --- .../application/juce_ApplicationCommandManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/juce_appframework/application/juce_ApplicationCommandManager.cpp b/src/juce_appframework/application/juce_ApplicationCommandManager.cpp index 9a785dee2f..be56083ef2 100644 --- a/src/juce_appframework/application/juce_ApplicationCommandManager.cpp +++ b/src/juce_appframework/application/juce_ApplicationCommandManager.cpp @@ -39,6 +39,7 @@ BEGIN_JUCE_NAMESPACE #include "../gui/components/windows/juce_ResizableWindow.h" #include "../gui/components/juce_Desktop.h" #include "../events/juce_MessageManager.h" +#include "../../juce_core/threads/juce_Process.h" //============================================================================== @@ -273,7 +274,7 @@ ApplicationCommandTarget* ApplicationCommandManager::findDefaultComponentTarget( } } - if (c == 0) + if (c == 0 && Process::isForegroundProcess()) { // getting a bit desperate now - try all desktop comps.. for (int i = Desktop::getInstance().getNumComponents(); --i >= 0;)