Skip to content

IsWindowAppearing in menu is true for 2 frames #3982

@codecat

Description

@codecat

Version/Branch of Dear ImGui:

Version: 1.83 WIP (commit 085cff2f)
Branch: docking

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_glfw.cpp (using hello_imgui, unsure how many modifications there are to vanilla imgui)
Operating System: Windows & Linux

My Issue/Question:

When I call IsWindowAppearing inside of a BeginMenu, it will be true for 2 frames instead of 1.

Standalone, minimal, complete and verifiable example:

if (ImGui::BeginMainMenuBar()) {
  if (ImGui::BeginMenu("Foo")) {
    if (ImGui::IsWindowAppearing()) {
      // This will print for 2 frames
      printf("Window is appearing\n");
    }
  }
  ImGui::EndMainMenuBar();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions