This may fix positioning when mousing over unit frames.
Scott Sibley [08-21-10 - 20:18]
This may fix positioning when mousing over unit frames.
diff --git a/Modules/Position.lua b/Modules/Position.lua
index 7b0bf45..96fd17e 100644
--- a/Modules/Position.lua
+++ b/Modules/Position.lua
@@ -272,7 +272,7 @@ end
local currentOwner
local currentThis
-local f = CreateFrame("Frame")
+local delayFrame = CreateFrame("Frame")
local function delayAnchor()
local this = currentThis
local owner = currentOwner
@@ -291,15 +291,13 @@ local function delayAnchor()
if updateFrame:GetScript("OnUpdate") then updateFrame:SetScript("OnUpdate", nil) end
this:SetPoint(StarTip.anchors[index], UIParent, StarTip.anchors[index], xoffset, yoffset)
end
+ delayFrame:SetScript("OnUpdate", nil)
end
function mod:GameTooltip_SetDefaultAnchor(this, owner)
- if owner == currentOwner and this == currentThis and owner ~= UIParent then
- return
- end
currentOwner = owner
currentThis = this
- f:SetScript("OnUpdate", delayAnchor)
+ delayFrame:SetScript("OnUpdate", delayAnchor)
end
function mod:REGEN_DISABLED()
@@ -312,5 +310,5 @@ mod.REGEN_ENABLED = mod.REGEN_DISABLED
function mod:OnHide()
updateFrame:SetScript("OnUpdate", nil)
- f:SetScript("OnUpdate", nil)
+ delayFrame:SetScript("OnUpdate", nil)
end
diff --git a/Modules/Text.lua b/Modules/Text.lua
index 936821d..8a45faf 100644
--- a/Modules/Text.lua
+++ b/Modules/Text.lua
@@ -505,6 +505,9 @@ do
end
table.wipe(fontStringsToDraw)
if UnitExists("mouseover") then
+ if GetMouseFocus() == UIParent then
+ GameTooltip:Hide()
+ end
GameTooltip:Show()
end
end