Skip to content

Commit a89f05a

Browse files
committedJun 29, 2019
Child windows inherit Hidden frames setting from parent more accurately, so HiddenFramesCannotSkipItems is honored by child windows.
1 parent 401e051 commit a89f05a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎imgui.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -5832,9 +5832,11 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
58325832
if (window->OuterRectClipped.Min.x >= window->OuterRectClipped.Max.x || window->OuterRectClipped.Min.y >= window->OuterRectClipped.Max.y)
58335833
window->HiddenFramesCanSkipItems = 1;
58345834

5835-
// Completely hide along with parent or if parent is collapsed
5836-
if (parent_window && (parent_window->Collapsed || parent_window->Hidden))
5835+
// Hide along with parent or if parent is collapsed
5836+
if (parent_window && (parent_window->Collapsed || parent_window->HiddenFramesCanSkipItems > 0))
58375837
window->HiddenFramesCanSkipItems = 1;
5838+
if (parent_window && (parent_window->Collapsed || parent_window->HiddenFramesCannotSkipItems > 0))
5839+
window->HiddenFramesCannotSkipItems = 1;
58385840
}
58395841

58405842
// Don't render if style alpha is 0.0 at the time of Begin(). This is arbitrary and inconsistent but has been there for a long while (may remove at some point)

0 commit comments

Comments
 (0)
Please sign in to comment.