From 97851f73764c1b0f77764ff850e59a31e025b722 Mon Sep 17 00:00:00 2001 From: omar Date: Mon, 16 Oct 2017 00:36:31 +0200 Subject: [PATCH] Nav: NavProcessItem() computes window-relative rectangle using own Window rather than NavWindow. Not sure what it may mean for child-flattened-nav (disabled). (#787) --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 39e55a576..825db0d50 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -2219,7 +2219,7 @@ static void NavProcessItem(ImGuiWindow* window, const ImRect& nav_bb, const ImGu // return; const ImGuiItemFlags item_flags = window->DC.ItemFlags; - const ImRect nav_bb_rel(nav_bb.Min - g.NavWindow->Pos, nav_bb.Max - g.NavWindow->Pos); + const ImRect nav_bb_rel(nav_bb.Min - window->Pos, nav_bb.Max - window->Pos); if (g.NavInitRequest && g.NavLayer == window->DC.NavLayerCurrent) { // Even if 'ImGuiItemFlags_NoNavDefaultFocus' is on (typically collapse/close button) we record the first ResultId so they can be used as a fallback