message: Internals: Updating condition/allow flags with a function.
diff: @@ -3920,6 +3920,13 @@ static ImVec2 FindBestPopupWindowPos(const ImVec2& base_pos, const ImVec2& size,
  return pos;
  }
  +static void SetWindowConditionAllowFlags(ImGuiWindow* window, ImGuiCond flags, bool enabled)
  +{
  + window->SetWindowPosAllowFlags = enabled ? (window->SetWindowPosAllowFlags | flags) : (window->SetWindowPosAllowFlags & ~flags);
  + window->SetWindowSizeAllowFlags = enabled ? (window->SetWindowSizeAllowFlags | flags) : (window->SetWindowSizeAllowFlags & ~flags);
  + window->SetWindowCollapsedAllowFlags = enabled ? (window->SetWindowCollapsedAllowFlags | flags) : (window->SetWindowCollapsedAllowFlags & ~flags);
  +}
  +
  ImGuiWindow* ImGui::FindWindowByName(const char* name)
  {
  ImGuiContext& g = *GImGui;
  @@ -3951,15 +3958,9 @@ static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFl
  ImGuiIniData* settings = FindWindowSettings(name);
  if (!settings)
  - {
  settings = AddWindowSettings(name);
  - }
  else
  - {
  - window->SetWindowPosAllowFlags &= ~ImGuiCond_FirstUseEver;
  - window->SetWindowSizeAllowFlags &= ~ImGuiCond_FirstUseEver;
  - window->SetWindowCollapsedAllowFlags &= ~ImGuiCond_FirstUseEver;
  - }
  + SetWindowConditionAllowFlags(window, ImGuiCond_FirstUseEver, false);
  if (settings->Pos.x != FLT_MAX)
  {
  @@ -4136,11 +4137,11 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
  window->CloseButton = (p_open != NULL);
  // Process SetNextWindow***() calls
  + if (window->Appearing)
  + SetWindowConditionAllowFlags(window, ImGuiCond_Appearing, true);
  bool window_pos_set_by_api = false, window_size_set_by_api = false;
  if (g.SetNextWindowPosCond)
  {
  - if (window->Appearing)
  - window->SetWindowPosAllowFlags |= ImGuiCond_Appearing;
  window_pos_set_by_api = (window->SetWindowPosAllowFlags & g.SetNextWindowPosCond) != 0;
  if (window_pos_set_by_api && ImLengthSqr(g.SetNextWindowPosPivot) > 0.00001f)
  {
  @@ -4158,8 +4159,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
  }
  if (g.SetNextWindowSizeCond)
  {
  - if (window->Appearing)
  - window->SetWindowSizeAllowFlags |= ImGuiCond_Appearing;
  window_size_set_by_api = (window->SetWindowSizeAllowFlags & g.SetNextWindowSizeCond) != 0;
  SetWindowSize(window, g.SetNextWindowSizeVal, g.SetNextWindowSizeCond);
  g.SetNextWindowSizeCond = 0;
  @@ -4175,8 +4174,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
  }
  if (g.SetNextWindowCollapsedCond)
  {
  - if (window->Appearing)
  - window->SetWindowCollapsedAllowFlags |= ImGuiCond_Appearing;
  SetWindowCollapsed(window, g.SetNextWindowCollapsedVal, g.SetNextWindowCollapsedCond);
  g.SetNextWindowCollapsedCond = 0;
  }
  @@ -4185,6 +4182,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
  SetWindowFocus();
  g.SetNextWindowFocus = false;
  }
  + if (window->Appearing)
  + SetWindowConditionAllowFlags(window, ImGuiCond_Appearing, false);
  // When reusing window again multiple times a frame, just append content (don't need to setup again)
  if (first_begin_of_the_frame)
  