Always on top is ALWAYS on top!

How do I create a window which is always on top of my own application’s windows but not all windows on the desktop (i.e. a floating palette) ?

Maybe I am wrong but Component::runModalLoop() should do the job.

It’s not something I’ve got built-in support for - I’ve thought about it over the years but never got around to it…

Yeah it’s a bit of a problem for me too, especially with plugins when you display additional windows you need to make them always on top but then they cover other OS windows, like when the host is asking for a file and your window is covering that dialog. That causes issues.

Is this something someone else can implement? What would be involved here? Don’t modal dialogs act like they are on top of other application windows?

Maybe we can just make these windows modeless modals (or modal modeless)?

It’s one of those things where the best way would be to use platform-dependent tricks to make it all work nicely, which would involve quite a bit of faffing and testing.

It also gets a bit tricky when you think about what the correct way is to define this - e.g. are you saying “window x is always in front of window y” (in which case there are complications if you have lots of these relationships, with cyclic dependencies, etc). Or would there just be a class of “floating” windows, which are all in front of your normal ones?

That, or “a window that prevents user-actions from allowing another window to appear on top in the Z order”.

Always on top of other JUCE windows/components in instance, and always on top in the OS (as it is now) i guess those two would be enough.

On the Mac, there are different window levels on screen that can be specified. This does not involve any relationships between individual windows.


Apple docs say: “The stacking of levels takes precedence over the stacking of windows within each level. That is, even the bottom window in a level will obscure the top window of the next level down.”

Yeah I also had issues with that. For example on an Ipad, when you “show a plain alert-window”, nothing appear until you touch the screen in order to focus and make appear the AlertWindow. Is there anyway to change this?

Have there been any changes related to this?

I’d like to have a window appear on the desktop, where the user can’t click on any another window until this one’s dismissed.