I have a button in my DialogWindow derived class and I want it to toggle the always on top mode for my window. so I do this:
setAlwaysOnTop( !isAlwaysOnTop() );
First click it becomes on top but on second click he stays on top and I cannot stop making it on top. I looked at the code and debugged it and got here:
I tried to do something simpler with the Juce demo and got the same problem:
MainDemoWindow::MainDemoWindow()
: DialogWindow (T(“JUCE Demo!”),
Colours::lavender,
false)
{
setVisible (true);
setResizeable (true); // resizability is a property of DialogWindow
// sets the main content component for the window to be this tabbed
// panel. This will be deleted when the window is deleted.
setContentComponent (new ContentComp());
setAlwaysOnTop( true );
setAlwaysOnTop( false );
}
the Juce demo window stays on top…maybe the problem is related to the DropShadowers or some other components that are becoming on top?
One more problem, if I click my always on top button on and off, the main window shadows remain on top until I switch to to my app again and then to another window using atl-tab, maybe I should repaint the window to prevent this?