Skip to content

Commit 803ac3a

Browse files
committed
IsWindowHovered() Fix behavior when an item is active to use the same logic as IsItemHovered() (#1382, #1404)
1 parent 1e7cc23 commit 803ac3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

imgui.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -5115,7 +5115,7 @@ bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags)
51155115
if (!IsWindowContentHoverable(g.HoveredRootWindow, flags))
51165116
return false;
51175117
if (!(flags & ImGuiHoveredFlags_AllowWhenBlockedByActiveItem))
5118-
if (g.ActiveId != 0 && g.ActiveIdWindow != g.CurrentWindow)
5118+
if (g.ActiveId != 0 && !g.ActiveIdAllowOverlap)
51195119
return false;
51205120
return true;
51215121
}
@@ -5151,7 +5151,7 @@ bool ImGui::IsRootWindowOrAnyChildHovered(ImGuiHoveredFlags flags)
51515151
if (!IsWindowContentHoverable(g.HoveredRootWindow, flags))
51525152
return false;
51535153
if (!(flags & ImGuiHoveredFlags_AllowWhenBlockedByActiveItem))
5154-
if (g.ActiveId != 0 && g.ActiveIdWindow != g.CurrentWindow)
5154+
if (g.ActiveId != 0 && !g.ActiveIdAllowOverlap)
51555155
return false;
51565156
return true;
51575157
}

0 commit comments

Comments
 (0)