Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
legoatoom opened this issue Apr 4, 2023 · 1 comment
Open

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

legoatoom opened this issue Apr 4, 2023 · 1 comment

Comments

@legoatoom
Copy link

Describe the bug

Using the #470 (comment) 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

  • v2.0.15.
  • Pop_OS!
  • Gnome

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.

if (this->repeat) {
bool increased = (gesture.percentage() >=
(this->repeatPercentage + this->repeatPercentageStep));
bool decreased = (gesture.percentage() <=
(this->repeatPercentage - this->repeatPercentageStep));
if (increased) {
this->executeAction(gesture);
this->repeatPercentage += this->repeatPercentageStep;
}
if (decreased) {
this->executeReverse(gesture);
this->repeatPercentage -= this->repeatPercentageStep;
}
}

@haarp
Copy link

haarp commented Sep 2, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants