Skip to content

Commit

Permalink
Modals: fixed issue hovering popups inside a child inside a modal. Fi…
Browse files Browse the repository at this point in the history
…xed IsWindowFocused()/IsWindowHovered() issues with childs inside popups. (#4676)(#4676, #4527)

Amend/fix 6b1e094f, fc4988f (Sep 24)
  • Loading branch information
ocornut committed Oct 27, 2021
1 parent 0f2898e commit c363b6d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ Breaking Changes:
Other Changes:

- Added IsMouseTripleClicked() function. Tracking multi-click count in IO structure. (#3229) [@kudaba]
- Modals: fixed issue hovering popups inside a child inside a modal. (#4676, #4527)
- Fixed IsWindowFocused()/IsWindowHovered() issues with childs inside popups. (#4676)
- InputText: made double-click select word, triple-line select line. Word delimitation logic differs
slightly from the one used by CTRL+arrows. (#2244)
- Backends: Vulkan: Call vkCmdSetScissor() at the end of render with a full-viewport to reduce
Expand Down
11 changes: 8 additions & 3 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6719,9 +6719,14 @@ void ImGui::PopTextWrapPos()

static ImGuiWindow* GetCombinedRootWindow(ImGuiWindow* window, bool popup_hierarchy)
{
window = window->RootWindow;
if (popup_hierarchy)
window = window->RootWindowPopupTree;
ImGuiWindow* last_window = NULL;
while (last_window != window)
{
last_window = window;
window = window->RootWindow;
if (popup_hierarchy)
window = window->RootWindowPopupTree;
}
return window;
}

Expand Down

0 comments on commit c363b6d

Please sign in to comment.