Calling toFront on juce::StandaloneFilterWindow doesn't bring standalone apps to front on Windows

Hi all,

In Standalone builds, I’m preventing multiple instances to run. Instead I want any already-running instance to get to the foreground whenever the user tries to launch a new instance. The following works on MacOS:

void anotherInstanceStarted(const juce::String&) override
{
mainWindow->setMinimised(false);
mainWindow->toFront(true);
}

but on Windows only the de-minimization part works.

Is this a known discrepancy between the two platforms ?

Thanks in advance!

1 Like

I don’t think the documentation indicates that this should happen, and on macOS it is a lucky side-effect of something? I agree there should be a way to do it, but it almost seems like moving an apps z order relative to the whole screen should be different than managing the z order of the application components.

Brings the component to the front of its siblings.

Oh, as a follow up, does ComponentPeer::toFront achieve this?

It might not be the window, but the process that needs to be brought to front.

Maybe try the static function “Process::makeForegroundProcess()