Skip to content

Commit

Permalink
TestSuite: amend "window_popup_menu"
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Jun 5, 2024
1 parent 6bba640 commit 59a3737
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions imgui_test_suite/imgui_tests_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1028,13 +1028,15 @@ void RegisterTests_Window(ImGuiTestEngine* e)
ctx->MouseSetViewport(window);
ctx->MouseMoveToPos(window->Rect().GetBL() + ImVec2(20.0f, -20.0f)); // Clicking parent window of menu popup closes it.
ctx->MouseClick();
#if !IMGUI_BROKEN_TESTS
if (vars.UseModal) // FIXME: Closing menu by clicking on a window under the modal
{
#if IMGUI_VERSION_NUM >= 19074
IM_CHECK_EQ(g.OpenPopupStack.Size, 1); // Fixed by #7654
#else
IM_CHECK_EQ(g.OpenPopupStack.Size, 2);
ctx->PopupCloseOne();
}
#endif
}
IM_CHECK_EQ(vars.FirstOpen, false);
IM_CHECK_EQ(vars.SecondOpen, false);
IM_CHECK_EQ(popup->Active, vars.UseModal);
Expand Down Expand Up @@ -1176,7 +1178,7 @@ void RegisterTests_Window(ImGuiTestEngine* e)
ImGui::Checkbox("Popup1 is modal", &vars.IsModalPopup[0]);
ImGui::Checkbox("Popup2 is modal", &vars.IsModalPopup[1]);
ImGui::Combo("Interrupt Kind", &vars.Variant, interrupt_kind, IM_ARRAYSIZE(interrupt_kind));
ImGui::Text("(Hold CTRL to display interrupting window)");
ImGui::Checkbox("Show interrupts (Hold CTRL)", &vars.ShowInterrupts);
}

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

0 comments on commit 59a3737

Please sign in to comment.