Unresponsive actionbars #14


  • Defect
Open
  • Kemayo created this issue Aug 16, 2018

    r65 said it fixed unresponsive actionbars after leaving a vehicle, but I'm still seeing it. (Via Bazooka and similar bar addons, which seem to use LibJostle.)

  • Kemayo added a tag Defect Aug 16, 2018
  • unrealhshh posted a comment Aug 19, 2018

    Yes, still not fixed.

  • millanzarreta posted a comment Aug 19, 2018

    I do not know if this helps. The problem occurs in the following line:

    494 :::: MainMenuBar:SetUserPlaced(true)

    I know that the use of SetUserPlaced is to prevent the original Blizzard UI code (UIParent.lua) from handling the MainMenuBar, but setting this to true on the MainMenuBar causes the action bar to become unclickable when leaving certain vehicles (for example: after you use the toy "Dazzling Rod") and don't trigger any LUA error.

     

    I don't know if the error is also produced by some other part of the code. I don't know how to fix, but I hope that with this help at least you can find which is the problem.

     

     


    Edited Aug 19, 2018
  • unrealhshh posted a comment Aug 25, 2018

    Try to catch event UPDATE_OVERRIDE_ACTIONBAR, then

     

    function Jostle:UPDATE_OVERRIDE_ACTIONBAR()
    	if HasBonusActionBar() or HasOverrideActionBar() or HasVehicleActionBar() or HasTempShapeshiftActionBar() or C_PetBattles.IsInBattle() then
    		MainMenuBar:SetUserPlaced(false)
    	end
    end
    

     


    Edited Aug 25, 2018
  • millanzarreta posted a comment Sep 8, 2018

    Useful info:

     

    - How force the action bars become unresponsive for test purposes?

     

    You can use the toy "Dazzling Rod", or you can set the WoW in Windowed mode and resize the WoW window.

     

    - How detect in code that action bars are in unresponsive state?

     

    This function returns nil only when action bars are unresponsive:

    MainMenuBar:GetPoint()

    So, you can check this with:

    if (MainMenuBar:GetPoint() == nil) then ... end

    - Can this unresponsive status get reverted?

     

    Yes, but only out of combat. If you do a MainMenuBar:SetPoint(...) the action bar get to its normal status again. The problem is that the last GetPoint positions can be different (UIParent.lua modify this, and some addons also modifys this). In my addon I do some like this in the function that is executed periodically to set the position of MainMenuBar:

    ...
    if (MainMenuBar:IsUserPlaced() and (MainMenuBar:GetPoint() == nil)) then
     MainMenuBar:SetPoint(MyAddon.LastMainMenuBarPoint[1], MyAddon.LastMainMenuBarPoint[2], MyAddon.LastMainMenuBarPoint[3], MyAddon.LastMainMenuBarPoint[4], MyAddon.LastMainMenuBarPoint[5])
    end
    ...

    To update the variable MyAddon.LastMainMenuBarPoint I do somethink like this once:

    -- initialize the variable
    MyAddon.LastMainMenuBarPoint = { "BOTTOM", UIParent, "BOTTOM", 0, MainMenuBar:GetYOffset() }

    -- hook to update the variable to the last not nil value of the MainMenuBar GetPoint
    hooksecurefunc(MainMenuBar, "SetPoint", function(self)
       local point, relativeTo, relativePoint, xOfs, yOfs = self:GetPoint()
       if (point ~= nil) and (xOfs ~= nil) and (yOfs ~= nil) then
         MyAddon.LastMainMenuBarPoint = { point, relativeTo, relativePoint, xOfs, yOfs }
       end
    end)

    All this have one problem. The MainMenuBar:SetPoint function can only be called out in combat, so, if the bars become unresponsive, this call to fix it should wait until the player leaves combat.

     

    I hope this helps you.

    Regards


    Edited Sep 9, 2018

To post a comment, please login or register a new account.