mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-28 01:20:55 +01:00
Nav: Fixed CTRL+TAB windowing list from always showing the implicit Debug window. (#787)
This commit is contained in:
parent
7e59eb026b
commit
93321d3280
@ -43,7 +43,7 @@ Other Changes:
|
||||
|
||||
- ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
|
||||
- ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
|
||||
- Nav: Added a CTRL+TAB window list and changed the highlight system accordingly. This is designed to allow CTRL+TAB between Tabs in the future.
|
||||
- Nav: Added a CTRL+TAB window list and changed the highlight system accordingly. This is designed to allow CTRL+TAB between Tabs in the future. (#787)
|
||||
- Window: Allow menu and popups windows from ignoring the style.WindowMinSize values so short menus/popups are not padded. (#1909)
|
||||
- Window: Added global io.OptResizeWindowsFromEdges option to enable resizing windows from their edges and from the lower-left corner. (#1495)
|
||||
- Drag and Drop: Fixed an incorrect assert when dropping a source that is submitted after the target (bug introduced with 1.62 changes
|
||||
|
15
imgui.cpp
15
imgui.cpp
@ -3188,11 +3188,7 @@ static const char* GetFallbackWindowNameForWindowingList(ImGuiWindow* window)
|
||||
void ImGui::NavUpdateWindowingList()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
if (!g.NavWindowingTarget)
|
||||
{
|
||||
g.NavWindowingList = NULL;
|
||||
return;
|
||||
}
|
||||
IM_ASSERT(g.NavWindowingTarget != NULL);
|
||||
|
||||
if (g.NavWindowingList == NULL)
|
||||
g.NavWindowingList = FindWindowByName("###NavWindowingList");
|
||||
@ -4387,14 +4383,17 @@ void ImGui::EndFrame()
|
||||
g.PlatformImeLastPos = g.PlatformImePos;
|
||||
}
|
||||
|
||||
NavUpdateWindowingList();
|
||||
|
||||
// Hide implicit "Debug" window if it hasn't been used
|
||||
IM_ASSERT(g.CurrentWindowStack.Size == 1); // Mismatched Begin()/End() calls, did you forget to call end on g.CurrentWindow->Name?
|
||||
if (g.CurrentWindow && !g.CurrentWindow->WriteAccessed)
|
||||
g.CurrentWindow->Active = false;
|
||||
End();
|
||||
|
||||
// Show CTRL+TAB list
|
||||
if (g.NavWindowingTarget)
|
||||
NavUpdateWindowingList();
|
||||
|
||||
// Initiate moving window
|
||||
if (g.ActiveId == 0 && g.HoveredId == 0)
|
||||
{
|
||||
if (!g.NavWindow || !g.NavWindow->Appearing) // Unless we just made a window/popup appear
|
||||
@ -4468,7 +4467,7 @@ void ImGui::Render()
|
||||
g.DrawDataBuilder.Clear();
|
||||
ImGuiWindow* windows_to_render_front_most[2];
|
||||
windows_to_render_front_most[0] = (g.NavWindowingTarget && !(g.NavWindowingTarget->Flags & ImGuiWindowFlags_NoBringToFrontOnFocus)) ? g.NavWindowingTarget->RootWindow : NULL;
|
||||
windows_to_render_front_most[1] = (g.NavWindowingList);
|
||||
windows_to_render_front_most[1] = g.NavWindowingTarget ? g.NavWindowingList : NULL;
|
||||
for (int n = 0; n != g.Windows.Size; n++)
|
||||
{
|
||||
ImGuiWindow* window = g.Windows[n];
|
||||
|
Loading…
Reference in New Issue
Block a user