1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Another attempt at fixing win32 plugin key hook loops.

This commit is contained in:
jules 2014-03-24 19:23:39 +00:00
parent fb9ef9e906
commit d102b61703

View file

@ -34,7 +34,6 @@ namespace
{
static HHOOK mouseWheelHook = 0, keyboardHook = 0;
static int numHookUsers = 0;
static bool keyboardHookReentrant = false;
struct WindowsHooks
{
@ -90,14 +89,10 @@ namespace
static LRESULT CALLBACK keyboardHookCallback (int nCode, WPARAM wParam, LPARAM lParam)
{
if (keyboardHookReentrant)
return 1;
ScopedValueSetter<bool> setter (keyboardHookReentrant, true, false);
MSG& msg = *(MSG*) lParam;
if (nCode == HC_ACTION && offerKeyMessageToJUCEWindow (msg))
if (nCode == HC_ACTION && wParam == PM_REMOVE
&& offerKeyMessageToJUCEWindow (msg))
{
zerostruct (msg);
msg.message = WM_USER;