Always on Top not working on MAC

I’ve creating a Always on top button for my main DialogWindow works fine with the PC when i call setAlwaysOnTop for some reason this isn’t working for OSX is this a bug or somthing the mac won’t do with juce?


I think it should work on the Mac, though I remember I had to bodge it a bit because there was no exact equivalent to the way it works on windows - I’ll have a look at it…


Im doing all my testing on Tiger by the way. Maybe there is somthing new with it.

Also i hear someone mention on here that there is a app striper for OSX? to help unbloat juce mac apps?

Yep, use the unix “strip” command.

Was just looking at this setAlwaysOnTop issue, actually…
In the mac version, you’ve commented:
"// can’t do anything here - have to let the Component::setAlwaysOnTop
// handle the mac as a special case."

but, the funtion itself is empty…
perhaps it needs to call getComponent()->setAlwaysOnTop(bool isOnTop) or something?

i don’t have a mac to try this on, though.

just a thought…

this works, but there seems to be a bug in addToDesktop(); If it has the same flags it never re-adds it to the desktop. I worked around this by removingFromDesktop(), getComponent()->setAlwaysOnTop(true)

Sounds likely - I’ve not had chance to try this on the mac yet, but it sounds like the fix would just be to add “removeFromDesktop()” before the line “addToDesktop (w->getStyleFlags());” in the mac-specific code in Component::setAlwaysOnTop(), component.cpp, line 683.

I’ll give that a try thanks

did this fix make it into 1.14?

Yes - did it sort out your problems?

I’m still deciding if i want to redo all my buttons :lol:

You mean the ButtonListener change? It’s not that bad - I changed all mine and it only took a few minutes. Makes things a bit more readable too.