Browse Source

Revert IsItemHovered() change for TabId. (#8877, #8883)

Amend 774ddb5 for docking. Revert 5a6fa33.
ocornut 2 weeks ago
parent
commit
1f7f1f54af
1 changed files with 3 additions and 0 deletions
  1. 3 0
      imgui.cpp

+ 3 - 0
imgui.cpp

@@ -4818,6 +4818,9 @@ bool ImGui::IsItemHovered(ImGuiHoveredFlags flags)
                 bool cancel_is_hovered = true;
                 if (g.ActiveId == window->MoveId && (id == 0 || g.ActiveIdDisabledId == id))
                     cancel_is_hovered = false;
+                // When ActiveId == TabId it means user clicked docking tab for the window.
+                if (g.ActiveId == window->TabId)
+                    cancel_is_hovered = false;
                 if (cancel_is_hovered)
                     return false;
             }