Rollovers break in Logic 8


#1

steps to reproduce:

Download tree from git, Date: Thu Sep 24 13:45:43 2009 +0100.
Get the audio plugin project compiling as AU.
Run in Logic 8 on OS 10.5.6.
Click on any component in the plugin window, or in the plugin window background.

symptom:

After clicking in the window, rolling over components does not highlight them. This condition persists until the plugin window is closed and opened again.

This problem does not show up in AU Lab.


#2

Not sure if this can easily be fixed - Cocoa simply doesn’t send mouse-moves to your window unless it has focus, so if your plugin doesn’t want focus, you’re not going to get any events.

In a juce app I fix this by making all the windows share their events, but in a host you don’t get that ability.

Lots of apps, including some Apple ones, seem to get around the problem by polling for the mouse position, but that leads to weird artifacts when your window is behind another window, and you still get mouse-moves through it (e.g.: try putting firefox behind a semi-transparent window like the pop-up dock windows, and you’ll see it still follows your mouse movements). I could do something similar in plugins, but it’d be a horrible bodge.


#3

But, rollovers are working fine most of the time! Just not after the plugin window is clicked. As I wrote, closing and opening the window makes them work again. Also, they work fine in AU Lab. So I imagine it’s quite fixable.


#4

I should clarify that I am only expecting rollovers to work in general when the window does have focus. Based on what you wrote, I can see why they don’t otherwise. The steps I listed break rollovers in Logic even when the plugin has focus.

Complicating the issue further, the rollovers do normally work in Logic even when another window has focus. Apparently Logic is passing on the events to the plugin. I agree that your “bodge” would be a bad idea — seems much cleaner for hosts to take care of this.


#5

Ok, I see… Well, I guess I’ll take a look at that then.