Skip to content

Commit

Permalink
Fix IsItemHovered() returning true for non-title bar hidden items tha…
Browse files Browse the repository at this point in the history
…t are clipped due to window collapsing logic. Fix 27fd1b9. (#823)
  • Loading branch information
ocornut committed Nov 18, 2017
1 parent 6f7b1bf commit 0676050
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2009,6 +2009,9 @@ bool ImGui::IsItemHovered(ImGuiHoveredFlags flags)
return false;
if (window->DC.ItemFlags & ImGuiItemFlags_Disabled)
return false;
// Special handling for the 1st item after Begin() which represent the title bar. When the window is collapsed (SkipItems==true) that last item will never be overwritten.
if (window->DC.LastItemId == window->MoveId && window->WriteAccessed)
return false;
return true;
}

Expand Down

0 comments on commit 0676050

Please sign in to comment.