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:
parent
fb9ef9e906
commit
d102b61703
1 changed files with 2 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue