r726 demo plugin steal keys in Digital Performer

Hello,

I just tried to compile the Juce demo plugin r726 under OSX, and it appears to conflict with the keys in Digital Performer.

At first once instantiated/inserted the keys are passing thru to DP (i.e. spacebar & the like for play/stop/rewind …)
But if you close the JuceDemoPlugin, then reopen it’s GUI, now the keys are not passing anymore to the host but generate osx alert sound.

The problem doesn’t happen with tag 1.46.

Anyone else ?

Salvator

Presumably it’d also happen if you just click in the Juce UI to give that window focus.

Bit of a tricky one to work out, as I’ve not got anything I can test it with, but how about this hack in juce_AU_Wrapper.mm, line 1204:

[code] addSubWindow();

        NSWindow* pluginWindow = [((NSView*) getWindowHandle()) window];
        [pluginWindow setNextResponder: hostWindow];

[/code]

Hello Jules,

many thanks for the suggestion. I tried to copy/paste the mentionned code in juce_AU_Wrapper.mm r728

Unfortunately, i got 3 errors when compiling :
/Downloads/trunk/extras/audio plugins/demo/build/mac/…/…/…/wrapper/AU/juce_AU_Wrapper.mm:1024: error: ‘addSubWindow’ was not declared in this scope

/Downloads/trunk/extras/audio plugins/demo/build/mac/…/…/…/wrapper/AU/juce_AU_Wrapper.mm:1026: error: ‘getWindowHandle’ was not declared in this scope

/Downloads/trunk/extras/audio plugins/demo/build/mac/…/…/…/wrapper/AU/juce_AU_Wrapper.mm:1027: error: ‘hostWindow’ was not declared in this scope

Thanks,

Salvator

Well, you’d need my latest check-in. The code I added today has this change in it.

Hello,

I just downloaded r728, compiled, and the issue persist in Digital performer 6.02.

note : it’s only in Digital performer, not in other AU host like i.e. Logic 8

Salvator

I’m a bit stuck for ideas then.

But you know that if your plugin doesn’t need keystrokes, you can set the config flag to disable it, and that’ll probably do the trick.

Hello,

Thanks for your response. I’m a newscomer with JUCE so are you talking about “#define JucePlugin_EditorRequiresKeyboardFocus 0” from JucePluginCharacteristics.h ?

If so, I’ve tried that already, but without sucess… I also tried to make a blank GUI with no control that could get key focus, and with almost no function.

But it’s just that as soon as the JuceDemo plugin is the frontmost window, every key (excluding apple dedicated volume, light, expose keys) are catched and do not pass thru to the host.

As it work fine with 1.46, I guess a solution exist somewhere …
Am I condamned to stick with 1.46 eternally ? :lol:

Salvator