Showing a modal window without the parent application


#1

Hi.

I have this issue, when I open a modal window and I switch to other application using ALT+TAB and then I go back,
I see only the modal window without the application.

This also happens in the Introjucer when you open a modal like the string encoder.

I don’t want a scenario in which a modal window is being shown without the parent application behind it,
is there an easy way to do that?

Edit: This happens on both Win & OSX.

Thanks.


#2

May I suggest you to add a ComponentListener on the modal window in which you do :

void Listener::componentBroughtToFront (Component &component)
{
    Component* parent = component.getParentComponent();
    if (parent != nullptr && parent->isMinimised()) parent->setMinimised(false);
}

#3

Thanks Nicolas.

Still it does not pass the “sneaking app test” which means:

  1. Open you Juce application.
  2. Open a modal window.
  3. Open a (not fullscreen) none-Juce app.
  4. Drag the modal window over the none-Juce app.

You need the parent application to become visible over the none-Juce app.


#4

I am not sure this can be done.
My domain of competency stops there.
Sorry !

Best regards.


#5

You could bring your main window forwards when your modal one is focused?


#6

Are you asking if I’m running as a plugin or as a standalone?

I guess the plugin version is out-of-the-question, what about in standalone?


#7

I feel compelled to ask on jules behalf - wtf?


#8

Hi hayxn

I can bring my application forward in a standalone version by exiting the modal, using setAlwaysOnTop() on the main window, and then
returning to modal state.


#9

Basically what I want is that there will never be a situation in which there’s another application between the modal window and the parent application.

That’s usually the case with modal windows I believe.