BR: Main Window with native title bar does not appear after application is started

This problem was resurfacing few times on the forum AFAIR. A blank GUI project works as expected. But it is enough to add one button to the MainComponent and then when such app is launched from the explorer, it cannot appear on the screen and it is just blinking on the taskbar. One possible workaround is to setNativeTitleBar (false) in the MainWindow constructor and to add at the end setNativeTitleBar (true). The problem is not present with the JUCE title bar.

Could you try modifying the following function from juce_win32_Windowing.cpp and check whether it resolves the problem for you? It seems to work for me for the GuiAppExample project.

static void* toFrontCallback1 (void* h)
{
    BringWindowToTop ((HWND) h);
    return nullptr;
}

If this also solves the issue for you and doesn’t introduce any regressions then I’ll add this to the develop branch.

1 Like

Yes, this works and I don’t see any regressions, at least for now. Thanks!

Thanks, I’ve pushed the fix here: