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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user