mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-20 23:06:36 +00:00
Fixed IsWindowFocused/IsWindowHovered with _ChildWindows for not following through popup parents (amend 6b1e094c
, fix #4527)
This commit is contained in:
parent
79d39b190b
commit
92a39f78b9
@ -7268,6 +7268,9 @@ bool ImGui::IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent,
|
|||||||
{
|
{
|
||||||
if (window == potential_parent)
|
if (window == potential_parent)
|
||||||
return true;
|
return true;
|
||||||
|
// 2021-09-11: we broke the unexpressed contract that this function (prior to 6b1e094, #4527)
|
||||||
|
// would follow through popup parents as well. Restoring this for now. May want to add a ImGuiFocusedFlags_PopupHierarchy flag later.
|
||||||
|
if ((window->Flags & ImGuiWindowFlags_Popup) == 0)
|
||||||
if (window == (dock_hierarchy ? window->RootWindowDockTree : window->RootWindow))
|
if (window == (dock_hierarchy ? window->RootWindowDockTree : window->RootWindow))
|
||||||
return false;
|
return false;
|
||||||
window = window->ParentWindow;
|
window = window->ParentWindow;
|
||||||
|
Loading…
Reference in New Issue
Block a user