Always on Top not working on MAC


#1

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?

Thanks


#2

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…


#3

Thanks

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?


#4

Yep, use the unix “strip” command.


#5

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…


#6

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)


#7

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.


#8

I’ll give that a try thanks


#9

did this fix make it into 1.14?


#10

Yes - did it sort out your problems?


#11

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


#12

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.


#13