You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IsItemHovered(), ItemAdd(): Fixed seemingly unnecessary comparaison of root windows, makes IsItemHovered() more consistent with internal IsHovered().
Original test was added in 6e99688 should not have been using RootWindow in the first place.
The difference between public-facing and internal versions would only be noticeable with overlapped child windows, which doesn't really happen anyway
// Set up for public-facing IsItemHovered(). We store the result in DC.LastItemHoveredAndUsable.
1951
-
// This is roughly matching the behavior of internal IsHovered()
1951
+
// This is roughly matching the behavior of internal-facing IsHovered()
1952
1952
// - we allow hovering to be true when ActiveId==window->MoveID, so that clicking on non-interactive items such as a Text() item still returns true with IsItemHovered())
1953
1953
// FIXME-OPT: Consider moving this code to IsItemHovered() so it's only evaluated if users needs it.
1954
-
if (g.HoveredRootWindow == window->RootWindow)
1955
-
{
1954
+
if (g.HoveredWindow == window)
1956
1955
if (IsMouseHoveringRect(bb.Min, bb.Max))
1957
1956
if (g.ActiveId == 0 || (id && g.ActiveId == *id) || g.ActiveIdAllowOverlap || (g.ActiveId == window->MoveId))
0 commit comments