diff --git a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm index 9523cdc3fc..efe02faae7 100644 --- a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm +++ b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm @@ -1180,6 +1180,8 @@ public: #else setWantsKeyboardFocus (true); #endif + + ignoreUnused (fakeMouseGenerator); } ~EditorCompHolder() @@ -1259,6 +1261,8 @@ public: } private: + FakeMouseMoveGenerator fakeMouseGenerator; + JUCE_DECLARE_NON_COPYABLE (EditorCompHolder) }; diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index c8b4ba1a72..f266428271 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -1576,7 +1576,7 @@ public: addMouseListener (this, true); #endif - ignoreUnused (fakeMouseGenerator); + ignoreUnused (fakeMouseGenerator); } ~EditorCompWrapper() diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 2f1dc39fec..79b82d27a7 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -40,6 +40,7 @@ #include "../utility/juce_IncludeModuleHeaders.h" #include "../utility/juce_WindowsHooks.h" #include "../utility/juce_PluginBusUtilities.h" +#include "../utility/juce_FakeMouseMoveGenerator.h" #include "../../juce_audio_processors/format_types/juce_VST3Common.h" #ifndef JUCE_VST3_CAN_REPLACE_VST2 @@ -849,6 +850,8 @@ private: setBounds (pluginEditor->getLocalBounds()); resizeHostWindow(); } + + ignoreUnused (fakeMouseGenerator); } ~ContentWrapperComponent() @@ -910,6 +913,7 @@ private: private: JuceVST3Editor& owner; + FakeMouseMoveGenerator fakeMouseGenerator; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (ContentWrapperComponent) }; diff --git a/modules/juce_audio_plugin_client/utility/juce_FakeMouseMoveGenerator.h b/modules/juce_audio_plugin_client/utility/juce_FakeMouseMoveGenerator.h index d239cc1eca..a324d31826 100644 --- a/modules/juce_audio_plugin_client/utility/juce_FakeMouseMoveGenerator.h +++ b/modules/juce_audio_plugin_client/utility/juce_FakeMouseMoveGenerator.h @@ -25,10 +25,10 @@ #ifndef JUCE_FAKEMOUSEMOVEGENERATOR_H_INCLUDED #define JUCE_FAKEMOUSEMOVEGENERATOR_H_INCLUDED -#if JUCE_MAC && JUCE_SUPPORT_CARBON +#if JUCE_MAC //============================================================================== -// Helper class to workaround carbon windows not getting mouse-moves.. +// Helper class to workaround windows not getting mouse-moves... class FakeMouseMoveGenerator : private Timer { public: @@ -39,7 +39,7 @@ public: void timerCallback() override { - // workaround for carbon windows not getting mouse-moves.. + // Workaround for windows not getting mouse-moves... const Point screenPos (Desktop::getInstance().getMainMouseSource().getScreenPosition()); if (screenPos != lastScreenPos)