AlertWindow should be always AlwaysOnTop


#1

If you are using a AlertWindow in a plugin, the window might appears behind the main-application window. And thats not so good.
The User has no chance to find it.
Why not setAlwaysOnTop (true) for all platforms ?

#if JUCE_MAC
setAlwaysOnTop (true);
#else
for (int i = Desktop::getInstance().getNumComponents(); --i >= 0;)
{
Component* const c = Desktop::getInstance().getComponent (i);

    if (c != 0 && c->isAlwaysOnTop() && c->isShowing())
    {
        setAlwaysOnTop (true);
        break;
    }
}

#endif


#2

Because on windows, if it’s always-on-top, then it’ll be in front of all other apps, which can be annoying if you try to put the app into the background while a dialog box is open. I’d have thought it would still be in front of the host window though…?


#3

I’d have thought it would still be in front of the host window though…?

Yes, but if you click anywhere in the host window the AlertWindow moves behind the host window. And when the host window uses a modal dialog too ( for example when you load a project, or offline rendering ), which is always on the top, ore moves to the top after the AlertWindow appears, its impossible to read whats in the AlertWindow and its complicated to close it ( via right click in the taskbar ).


#4

maybe you could add a always on the top option…


#5

I think the real issue is nothing to do with being always-on-top, but that it needs to actually cause a proper modal loop when the dialog is open, and stop access to the rest of the app. This is a bit tricky, but it’s something I was going to look at anyway when I get chance…


#6