From 974232f750f7b348c52fa528ba7a35b6b0d4b510 Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Mon, 7 Sep 2026 15:10:12 +0200 Subject: [PATCH] Make Cursor Tooltip hide instantly Use the upstream Cursor Tooltip ownership lifecycle so world-unit tooltips disappear immediately while keeping the optimized cursor-follow implementation and leaving behavior unchanged when the module is disabled. --- mods/cursor-tooltip.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mods/cursor-tooltip.lua b/mods/cursor-tooltip.lua index 9a122b1..d797055 100644 --- a/mods/cursor-tooltip.lua +++ b/mods/cursor-tooltip.lua @@ -66,7 +66,11 @@ module.enable = function(self) return originalDefaultAnchor(tooltip, parent) end - tooltip:SetOwner(parent or UIParent, "ANCHOR_NONE") + -- Cursor Tooltip intentionally uses ANCHOR_CURSOR without marking the + -- tooltip as a default anchored tooltip. This matches the upstream mod's + -- lifecycle and makes world-unit tooltips disappear immediately when the + -- mouseover unit is lost, while keeping the custom cursor positioning. + tooltip:SetOwner(parent or UIParent, "ANCHOR_CURSOR") tooltip:ClearAllPoints() -- Position once before Show() so there is no first-frame jump from the @@ -75,7 +79,6 @@ module.enable = function(self) tooltip:SetPoint("BOTTOMLEFT", cursor, "TOPRIGHT", 12, 12) tooltip:SetClampedToScreen(true) - tooltip.default = 1 following = true end