From 6def01be5df16e17d71f81a8d4083a0f48d04a8d Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 25 Sep 2016 14:32:38 +0200 Subject: [PATCH] Fixed IsItemActive() lagging by one frame on initial widget activation (#840) --- imgui.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index afd58724..c33efc98 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -1828,6 +1828,8 @@ void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window = NULL) g.ActiveId = id; g.ActiveIdAllowOverlap = false; g.ActiveIdIsJustActivated = true; + if (id) + g.ActiveIdIsAlive = true; g.ActiveIdWindow = window; }