Skip to content

Commit b475079

Browse files
committed
Nav: Fixed CTRL+Tab into a root window with only childs with _NavFlattened flags erroneously initializing default nav layer to menu layer.
1 parent eed7b0e commit b475079

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/CHANGELOG.txt

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ Other changes:
4848
(#6341) [@lukaasm]
4949
- Nav: Fixed navigation within tables/columns where item boundaries goes beyond columns limits,
5050
unclipped bounding boxes would interfere with other columns. (#2221) [@zzzyap, @ocornut]
51+
- Nav: Fixed CTRL+Tab into a root window with only childs with _NavFlattened flags
52+
erroneously initializing default nav layer to menu layer.
5153
- Debug Tools: Debug Log: Fixed not parsing 0xXXXXXXXX values for geo-locating on mouse
5254
hover hover when the identifier is at the end of the line. (#5855)
5355
- Backends: Clear bits sets io.BackendFlags on backend Shutdown(). (#6334, #6335] [@GereonV]

imgui.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -5375,6 +5375,10 @@ void ImGui::EndChild()
53755375
{
53765376
// Not navigable into
53775377
ItemAdd(bb, 0);
5378+
5379+
// But when flattened we directly reach items, adjust active layer mask accordingly
5380+
if (window->Flags & ImGuiWindowFlags_NavFlattened)
5381+
parent_window->DC.NavLayersActiveMaskNext |= window->DC.NavLayersActiveMaskNext;
53785382
}
53795383
if (g.HoveredWindow == window)
53805384
g.LastItemData.StatusFlags |= ImGuiItemStatusFlags_HoveredWindow;

0 commit comments

Comments
 (0)