Plugins disappearing in Live when application loses focus

I’m having a rather strange problem, and searching the forums makes it looks like it’s somewhat unique to me (uh oh). Using juce 1.52.11, and compiling the demo plugin, if I open it (as a component) in Ableton Live 7.0.18 on my mac running 10.6.6, everything works OK - but if I switch to another application and back to Live, the plugin’s window disappears. To get it back, I can hit Live’s “show plugin window” button twice (once to “hide”, because it remains on “show”, then again to “show” it again). This is accompanied by the message in console:

Mon Feb 21 21:54:25 X.local Live[74659] : kCGErrorIllegalArgument: _CGSFindSharedWindow: WID 163644
Mon Feb 21 21:54:25 X.local Live[74659] : kCGErrorIllegalArgument: CGSSetWindowProperty: Invalid window 0x27f3c
Mon Feb 21 21:54:25 X.local Live[74659] : kCGErrorIllegalArgument: CGSRemoveWindowFromWindowOrderingGroup: error setting window property
Mon Feb 21 21:54:26 X.local Live[74659] : kCGErrorIllegalArgument: _CGSFindSharedWindow: WID 163644
Mon Feb 21 21:54:26 X.local Live[74659] : kCGErrorIllegalArgument: CGSRemoveWindowFromWindowMovementGroup: Invalid window

This also happens with plugins I’ve written. It does NOT happen with the VSTs - only the audio units. It doesn’t happen in AU Lab. Any tips? It’s not a show stopper but it is rather annoying to have the windows disappearing all the time.

-Colin

The difference between AU lab and Live is probably that AU lab is using the plugin’s cocoa UI and Live is using the old carbon wrapper, (which is all a bit of a bodge involving carbon windows floating in front of host windows, etc, and prone to problems like this).

Interesting. Is there any way you know of to avoid the behavior? Other than bugging Ableton to update?

-Colin