Masque

145 - Bug with SecureActionButtonTemplate

Hey again :)

I'm playing around with SecureAuraHeaderTemplate and encountered a problem with Masque. I create buttons in combat and the skinning goes wrong (the border is behind the icon). After some testing I found the problem in Masque.

In Masque\Core\Button.lua you got the following code:

-- Taint protection, just in case.
if Button.IsProtected and Button:IsProtected() and InCombatLockdown() then
  return
end
local level = Button:GetFrameLevel()
if level < 4 then
  level = 4
end
Button:SetFrameLevel(level)

This will normally set the frame level for the __MSQ_BaseFrame frame, but because the buttons are created in combat it will never happen. This is easily fixed by adding the following:

-- Taint protection, just in case.
if Button.IsProtected and Button:IsProtected() and InCombatLockdown() then
  Hook_SetFrameLevel(Button);
  return
end
....

This will still change the __MSQ* frames but not change the framelevel of the protected button.

Atm I have the following workaround in my code after the :AddButton(...):

Button.__MSQ_BaseFrame:SetFrameLevel(2)

Can you make this change to your code?

User When Change
Beautiuz Feb 18, 2013 at 17:59 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of StormFX StormFX Feb 19, 2013 at 05:42 UTC - 0 likes

    What you're suggesting will call the :SetFrameLevel() methods (in the hook function) on the sub-frames during combat (Causing taint). The "BaseFrame" isn't protected, but I'm sure the other two (Cooldown & AutoCast) are, since they'd inherit that from the button. I'll take a look at it and see if I can come up with a viable solution.

    Last edited Feb 19, 2013 by StormFX
  • 1 comment

Facts

Reported
Feb 18, 2013
Status
New - Issue has not had initial review yet.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees