I'm using Ableton Live 9 on Mac. I noticed that mouseMove & mouseEnter are not called until the GUI receives one mouse click, then everything works fine.
If I then close the editor and reopen it, the same thing.
Am I doing something wrong or is this the correct behaviour?
Sorry, maybe I replied too soon, I had already clicked the bar at the top of the top, turning the left most circle red but needed to click the actual GUI in order for the callbacks to become active
In apps, I have a few tricks in JUCE that let the GUIs handle mouse-moves before the windows get focused, but that sort of hackery isn't available in plugins, so the windows have to behave in the way the OS/host makes them.
When I open the GUI in Ableton, it doesn't have focus, then when I click the grey bar above my plugin, it DOES have focus but still those callbacks don't trigger until I actually make a click on the GUI (not the grey bar)
I'll take a look at the Audio plugin demo and see what I'm doing differently
I believe that the titlebar for the window isn't part of the content component, which is where the mouseEvents listeners are responsive. perhaps that's the problem?
Maybe the titlebar has focus, as opposed to the content component, and clicking on the content component changes the focus, which turns on the event listeners. I'm just guessing tho..
and the callbacks happen even if I only click the bar at the top. Also, I just noticed the keys on the midi keyboard light up as I hover over them on the Demo but in my plugin, that only happens after I click once on the GUI!!
Did you set “Plugin Editor requires Keyboard Focus” in Introjucer?
You might also need to add setWantsKeyboardFocus(true) in your PluginEditor component?
I hadn't set that but I looked and Jules has set that for the demo so I'll try that. I'm busy with somehting for half an hour but I'll report back once I've checked that out