1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

FIxed IsWindowFocused() using wrong flag types (harmless as values were identical). (#8786)

This commit is contained in:
ocornut 2025-07-10 18:42:39 +02:00
parent 4d745bc602
commit c680f54e6c

View file

@ -12501,10 +12501,10 @@ bool ImGui::IsWindowFocused(ImGuiFocusedFlags flags)
IM_ASSERT(cur_window); // Not inside a Begin()/End()
const bool popup_hierarchy = (flags & ImGuiFocusedFlags_NoPopupHierarchy) == 0;
if (flags & ImGuiHoveredFlags_RootWindow)
if (flags & ImGuiFocusedFlags_RootWindow)
cur_window = GetCombinedRootWindow(cur_window, popup_hierarchy);
if (flags & ImGuiHoveredFlags_ChildWindows)
if (flags & ImGuiFocusedFlags_ChildWindows)
return IsWindowChildOf(ref_window, cur_window, popup_hierarchy);
else
return (ref_window == cur_window);