1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-14 00:14:18 +00:00

Make the mousemove behaviour of OS X plug-ins the same as their Windows counterparts

This commit is contained in:
tpoole 2016-08-19 09:53:13 +01:00
parent 48db4fa75a
commit 08b2116c2b
4 changed files with 12 additions and 4 deletions

View file

@ -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)
};

View file

@ -1576,7 +1576,7 @@ public:
addMouseListener (this, true);
#endif
ignoreUnused (fakeMouseGenerator);
ignoreUnused (fakeMouseGenerator);
}
~EditorCompWrapper()

View file

@ -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)
};

View file

@ -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<float> screenPos (Desktop::getInstance().getMainMouseSource().getScreenPosition());
if (screenPos != lastScreenPos)