Skip to content

Commit 3457757

Browse files
committed
TestSuite: amend "window_popup_menu"
ocornut/imgui#7654
1 parent 6bba640 commit 3457757

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

imgui_test_suite/imgui_tests_core.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,13 +1028,15 @@ void RegisterTests_Window(ImGuiTestEngine* e)
10281028
ctx->MouseSetViewport(window);
10291029
ctx->MouseMoveToPos(window->Rect().GetBL() + ImVec2(20.0f, -20.0f)); // Clicking parent window of menu popup closes it.
10301030
ctx->MouseClick();
1031-
#if !IMGUI_BROKEN_TESTS
10321031
if (vars.UseModal) // FIXME: Closing menu by clicking on a window under the modal
10331032
{
1033+
#if IMGUI_VERSION_NUM >= 19074
1034+
IM_CHECK_EQ(g.OpenPopupStack.Size, 1); // Fixed by #7654
1035+
#else
10341036
IM_CHECK_EQ(g.OpenPopupStack.Size, 2);
10351037
ctx->PopupCloseOne();
1036-
}
10371038
#endif
1039+
}
10381040
IM_CHECK_EQ(vars.FirstOpen, false);
10391041
IM_CHECK_EQ(vars.SecondOpen, false);
10401042
IM_CHECK_EQ(popup->Active, vars.UseModal);
@@ -1176,7 +1178,7 @@ void RegisterTests_Window(ImGuiTestEngine* e)
11761178
ImGui::Checkbox("Popup1 is modal", &vars.IsModalPopup[0]);
11771179
ImGui::Checkbox("Popup2 is modal", &vars.IsModalPopup[1]);
11781180
ImGui::Combo("Interrupt Kind", &vars.Variant, interrupt_kind, IM_ARRAYSIZE(interrupt_kind));
1179-
ImGui::Text("(Hold CTRL to display interrupting window)");
1181+
ImGui::Checkbox("Show interrupts (Hold CTRL)", &vars.ShowInterrupts);
11801182
}
11811183

11821184
float spacing = ImFloor(ImGui::GetFontSize() * 2.0f);

0 commit comments

Comments
 (0)