Minimised window can't be showed again if alwaysOnTop is set


#1

On osx 10.13.6 with Juce 5.3.2, I created a basic app from the templates.

Then I set the main window as “always on top” with mainWindow->setAlwaysOnTop(true); in the initialise() method.

Now if I minimize the window by clicking the “-” button in the title bar (tried with both native and juce bar), it looks like the window is brought back, then immediatly hidden, and there is no way to see it again. Dock icon is still present and proposes the option to hide again, so it’s not minimized anymore, but the actual window can’t be found anywhere.

I tried to track things down in the debugger, but it seems that the window flashing and disappearing appears even before entering ComponentPeer::handleMovedOrResized() so seemingly at OS level.

Since the window behaves normally when isAlwaysOnTop is off, is there a way to hook the minimize process at OS level in order to remove this faulty flag, and put it back again when the window reappears?


#2

Thanks for the report, I’ll push a fix for this shortly.