fix(totems): raise frame level so right-click reaches the totem strip

Parent unit button registers AnyUp clicks and opens the unit popup via
frame.menu — and was z-above the totem (which sat at frame level 1),
so right-clicks fell through to the popup instead of dismissing the
totem. Lift the totem to topFrameLevel + 5 so it wins the click.
This commit is contained in:
2026-05-25 11:57:54 +02:00
parent c0a23544f1
commit 3686bb4f9f
+3 -1
View File
@@ -37,7 +37,9 @@ function Totems:OnEnable(frame)
for id=1, MAX_TOTEMS do
local totem = ShadowUF.Units:CreateBar(frame)
totem:SetFrameLevel(1)
-- Sit above the parent unit button (RegisterForClicks "AnyUp" + frame.menu)
-- so right-clicks land on the totem strip instead of opening the unit popup.
totem:SetFrameLevel((frame.topFrameLevel or 5) + 5)
totem:SetMinMaxValues(0, 1)
totem:SetValue(0)
totem.id = MAX_TOTEMS == 1 and 1 or TOTEM_PRIORITIES[id]