ocornut / imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
MIT License
60.67k stars 10.25k forks source link

Feature request: ALWAYS_ON_FRONT #390

Open usagi opened 8 years ago

usagi commented 8 years ago

I need "always on front" behavior to the ImGui window. But, I think it is difficult to control from the outside of current ImGui. Therefore, I propose an additional ALWAYS_ON_FRONT flag and behavior to ImGuiWindowFlags.


Please you tell me a better solution If you know the other easy way with the current implements.

ocornut commented 8 years ago

What exactly are you trying to achieve?

Even tough adding a ImGuiWindowFlags_AlwaysInFront seems easy, we'd have to decide how popups/menus would behave. Should any popup still appear in the front of AlwaysInFront windows. I can imagine case when this is desirable and case where it isn't.

The ImGuiWindowFlags_NoFocusOnAppearing and ImGuiWindowFlags_NoBringToFrontOnFocus flags also might be useful to you to do the opposite, aka not moving another window to the front.

v3n commented 8 years ago

I would think that AlwaysInFront would treat the context as having two layers, one for alerts/menu pop up windows and the other for all other windows, which AlwaysInFront would be in front of.

How would this flag behave with multiple windows with this flag overlapping each other?

dkrikun commented 8 years ago

Also, IMO, the main menu bar should be always-on-top.

ocornut commented 8 years ago

Perhaps but that create potential issues with windows that are high up, we need to shrink the region where normal windows can be so it's not possible to "lose" them behind the menu. Also consider that the main menu can be toggled on/off. So there's a bit of development required to sort those things out.

hippyau commented 5 years ago

It would be super useful to get the main menu bar on top, as my frameless window needs max/min/close controls.

Greendogo commented 3 years ago

Is there a way to do this yet? I'm trying to build a screen recording function and this is a necessity.