JoseExposito / touchegg

Linux multi-touch gesture recognizer
GNU General Public License v3.0
3.61k stars 167 forks source link

[Bug] Oposite key is capped at original state. #620

Open legoatoom opened 1 year ago

legoatoom commented 1 year ago

Describe the bug

Using the https://github.com/JoseExposito/touchegg/issues/470#issuecomment-797334794 config, I am altering the volume with gestures. However, when increasing and then reversing, it does not go lower than the starting volume. Same for going down then up.

Expected behavior

The gesture reverse action should not be capped by the original state.

Actual behavior

The gesture reverse action is capped by the original state.

Your environment

Potential Source of issue.

From my limited search I came across this function that determines the reverse action. However the increase/decrease both use or equal than. My hypothesis is that when it reaches 0, both are true, resulting in both a normal and reverse action. In other words, nothing happening.

https://github.com/JoseExposito/touchegg/blob/ef2360ba8fba1a148d9e7c52df8c82dfa4f7648f/src/actions/repeated-action.cpp#L52-L67

haarp commented 1 year ago

It's probably intentional, so you can use the opposite direction as a sort of "cancel" or "undo". Kinda makes sense to me