mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-12 02:00:58 +01:00
Added ImGuiWindowFlags_NoBringToFrontOnFocus behavior.
This commit is contained in:
parent
c1983d5c3f
commit
e031fe484c
@ -4149,9 +4149,9 @@ void ImGui::FocusWindow(ImGuiWindow* window)
|
||||
if (g.ActiveId != 0 && g.ActiveIdWindow && g.ActiveIdWindow->RootWindow != window)
|
||||
ImGui::SetActiveID(0);
|
||||
|
||||
if (g.Windows.back() == window)
|
||||
// Bring to front
|
||||
if ((window->Flags & ImGuiWindowFlags_NoBringToFrontOnFocus) || g.Windows.back() == window)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < g.Windows.Size; i++)
|
||||
if (g.Windows[i] == window)
|
||||
{
|
||||
|
1
imgui.h
1
imgui.h
@ -458,6 +458,7 @@ enum ImGuiWindowFlags_
|
||||
ImGuiWindowFlags_MenuBar = 1 << 10, // Has a menu-bar
|
||||
ImGuiWindowFlags_HorizontalScrollbar = 1 << 11, // Enable horizontal scrollbar (off by default). You need to use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section.
|
||||
ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12, // Disable taking focus when transitioning from hidden to visible state
|
||||
ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13, // Disable bringing window to front when taking focus (e.g. clicking on it or programatically giving it focus)
|
||||
// [Internal]
|
||||
ImGuiWindowFlags_ChildWindow = 1 << 20, // Don't use! For internal use by BeginChild()
|
||||
ImGuiWindowFlags_ChildWindowAutoFitX = 1 << 21, // Don't use! For internal use by BeginChild()
|
||||
|
Loading…
Reference in New Issue
Block a user