doadin / Plexus

Other
10 stars 2 forks source link

[Bug] Clique "Trigger on 'down' portion of click" stops working #82

Closed dabadoo closed 1 year ago

dabadoo commented 1 year ago

Describe the bug Sometimes the Clique "Trigger on 'down' portion of click" stops working. Normally I would assume this was a issue on cliques side, but this has only started happening after switching to Plexus. To fix I simply have to reenter clique settings and it starts working again.

To Reproduce Steps to reproduce the behavior: I don't know how to reproduce. To me, it appears to just randomly stop working. No errors. No anything. I haven't noticed a pattern.

Expected behavior When using clique with the setting checked. Actions should trigger on down portion.

Desktop (please complete the following information):

doadin commented 1 year ago

Are you sure you don't have anything like PlexusClickSets enabled or any other maybe in-game binding setup? Unfortunately, if there is no conflicting addons/setting I do believe this is a clique issue. Plexus on its own only modifies bindings for menu/right click any other is untouched by Plexus alone. So something else must be affecting it. @jnwhiteh

jnwhiteh commented 1 year ago

Hey there! It seems like this isn't actually about the bindings, but is about the RegisterForClicks calls that are being made. It's a difference between AnyDown and AnyUp or the specific versions of that. If you're making a RegisterForClicks call, that could be causing this issue. Unfortunately I don't think there's a good way for multiple addons working on a secure action button to maintain this setting, but perhaps that's something to look into. I don't believe there's a getter for RegisterForClicks.

Is Plexus calling RFC anywhere?

dabadoo commented 1 year ago

plexus

These are the plugins I'm using.

The way to fix it, when it stops working, is by going into Clique options and unticking and reticking the "Trigger bindings on the 'down' portion of the click"

The only reason I suspect Plexus, is that I tried a lot of different frames. None of them have had this weird bug happening while using clique.

My clique settings if relevant: clique I don't know what the "Attempt to fix the issue introduced in 4.3...." option does. I only enabled it after noticing the issue in hopes of fixing it. It made no difference.

dabadoo commented 1 year ago

A simple /reload seems to make the bug happen actually.

dabadoo commented 1 year ago

Hey there! It seems like this isn't actually about the bindings, but is about the RegisterForClicks calls that are being made. It's a difference between AnyDown and AnyUp or the specific versions of that. If you're making a RegisterForClicks call, that could be causing this issue. Unfortunately I don't think there's a good way for multiple addons working on a secure action button to maintain this setting, but perhaps that's something to look into. I don't believe there's a getter for RegisterForClicks.

Is Plexus calling RFC anywhere?

Don't understand LUA, but if relevant. Searched my plexus folder:

_classicera\Interface\AddOns\Plexus\Frame.lua (1 hit) Line 143: frame:RegisterForClicks("AnyUp") _classicera\Interface\AddOns\Plexus\Layout.lua (1 hit) Line 883: f.tab:RegisterForDrag("LeftButton") _classicera\Interface\AddOns\Plexus\Libs\AceGUI-3.0\widgets\AceGUIWidget-Keybinding.lua (1 hit) Line 191: button:RegisterForClicks("AnyDown") _classicera\Interface\AddOns\Plexus\Libs\LibDBIcon-1.0\LibDBIcon-1.0.lua (3 hits) Line 251: button:RegisterForClicks("anyUp") Line 252: button:RegisterForDrag("LeftButton") Line 509: registerForAnyClick = true,

jnwhiteh commented 1 year ago

I'm not sure where I am or how I got here or who I'm talking to, just trying to help out with my knowledge of Clique :D

If I had to guess, I'd say that if you changed the first hit you found to AnyDown it might fix it to work the way you'd like.

doadin commented 1 year ago

@jnwhiteh sorry I (Doadin) tagged you on github PR for my addon(Plexus, aka continuation of Grid) as this user has mentioned plexus has a line frame:RegisterForClicks("AnyUp") . Should this not be called if clique is enabled?

jnwhiteh commented 1 year ago

Haha it's not a problem that's what I figured :D Nice to see that you're continuing Grid!

The problem is that if you call AnyUp then any binding will only trigger when the click comes up, rather than when it goes down which is often what is wanted. It may be worth getting a reproducible condition from the original reporter and then trying "AnyUp", "AnyDown" to see if that fixes it.

I do suspect that is what is "breaking" the option in Clique, since that specific one relies on AnyDown. I'm not sure the ("AnyUp", "AnyDown") will work.

Not sure what the best option here is but happen to talk through it.

dabadoo commented 1 year ago

Changing

classic_era\Interface\AddOns\Plexus\Frame.lua (1 hit) Line 143: frame:RegisterForClicks("AnyUp")

as suggested to

frame:RegisterForClicks("AnyDown")

or

frame:RegisterForClicks("AnyUp", "AnyDown")

fixes my issue. It works when I login. It works after a /reload. Haven't noticed any issues.

dabadoo commented 1 year ago

!!! Just found out that- frame:RegisterForClicks("AnyUp", "AnyDown") -bugs right clicking frames. Makes the menu appear and dissapear.

Only doing- frame:RegisterForClicks("AnyDown") -causes no issues that I've noticed.

doadin commented 1 year ago

!!! Just found out that- frame:RegisterForClicks("AnyUp", "AnyDown") -bugs right clicking frames. Makes the menu appear and dissapear.

Only doing- frame:RegisterForClicks("AnyDown") -causes no issues that I've noticed.

Does this break the opposite though? Does bind with key up still work as it should? Thanks for testing!

dabadoo commented 1 year ago

Do you mean if any of those settings "break" clique the opposite way? Then the answer seems to be yes.

frame:RegisterForClicks("AnyUp") -- Your currernt default. Gives the issue that made me post this.

frame:RegisterForClicks("AnyDown") and frame:RegisterForClicks("AnyUp", "AnyDown") -- Does give the opposite issue with clique. Now when you login/reload the default will be your binds/mouse clicks working as soon as you press down. If you want spells/clicking to work on the Up portion, you would have to once again go to the clique settings and tick and untick the setting.

doadin commented 1 year ago

@jnwhiteh maybe just a simple check to see if clique is loaded then check the click setting then register for which ever setting matches clique setting?

doadin commented 1 year ago

@jnwhiteh Do you think this would work?

if _G.Clique then
    local direction = _G.Clique.settings.downclick and "AnyDown" or "AnyUp"
    frame:RegisterForClicks(direction)
else
    frame:RegisterForClicks("AnyUp")
end
doadin commented 1 year ago

I am hoping it works and pushing out this change: 666be77af1720a4ec5dee6d57eaa9b016ec5a87b let me know if it does not fix this issue or does. If not you can just reopen the issue.

dabadoo commented 1 year ago

Quick test. Seems to work as expected and follows the rule set by clique. Cheers!