AU plugs: DialogWindow shown on the back

Ho to all.

I’m working porting an au plug to MacIntel.

I’m using Juce 1.30. I’ve noticed that new Window added to desktop like that:

if (creditsWindow == 0)
        {
            creditsWindow = new CreditsWindow();
            creditsWindow->setBounds (getScreenX() + 50, getScreenY() + 50, 300, 200);
            creditsWindow->setVisible (true);
        }

are shown on the back of the plug main Window.
This happens with DialogWindow, AlertBoxes, JuceFileChooser.

On the back…! I always wondered what was on the back of windows…

In fact, I’m currently sweating over a rewrite of the mac windowing code so that it uses HIViews instead of Windows, which is now mandatory for AU plugins on intel. It’ll also improve normal windowing a bit, and means I can finally ditch the old QuickDraw code.

Annoyingly though, doing this is having so many knock-on effects that I’m also having to rewrite all the Mac graphics code to use Quartz for rendering - something I’d always planned to do, but it’s a lot of work. That’s why I’ve been a bit quiet this week…

Could you tell me where I can hack the code to solve this problem, or it is an hard task?

Now I only need to bring new windows in front of the main plug-in interface.

thanx
regards

Not sure if there are complications with an intel mac, but you could try messing with the window group stuff in the AU wrapper code.

It’s hard, I think.

Apple decided to use compositing window in Logic on Intel Mac. So we have to draw our stuff on the HIView instead of drawing directly on the base window. Also we should use proper Carbon Events which is basically control event class.

However, on the PPC Macs, the plugin window is still non-compositing even Logic Pro 7.2. That means we still need legacy style if we need to build plugins as universal binary…

Since Logic 7.2 uses window group for plugin window and there are no other controls/HIViews, we can draw our stuff directly onto the window nad it might look fine, but we should not do that.

(Jules already mentioned about HIView in his comment. :slight_smile: )

Masa