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

touch: fix touch swipe invert config #7014

Merged
merged 1 commit into from
Jul 24, 2024
Merged

Conversation

leon-erd
Copy link
Contributor

Describe your PR, what does it fix/add?

Fixes #7013 for me.
@khachbe I think you forgot to change this line.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

@earboxer what does this function do?

void CInputManager::onSwipeUpdate(IPointer::SSwipeUpdateEvent e) {
EMIT_HOOK_EVENT_CANCELLABLE("swipeUpdate", e);
if (!m_sActiveSwipe.pWorkspaceBegin)
return;
static auto PSWIPEINVR = CConfigValue<Hyprlang::INT>("gestures:workspace_swipe_invert");
const bool VERTANIMS = m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.getConfig()->pValues->internalStyle == "slidevert" ||
m_sActiveSwipe.pWorkspaceBegin->m_vRenderOffset.getConfig()->pValues->internalStyle.starts_with("slidefadevert");
const double delta = m_sActiveSwipe.delta + (VERTANIMS ? (*PSWIPEINVR ? -e.delta.y : e.delta.y) : (*PSWIPEINVR ? -e.delta.x : e.delta.x));
updateWorkspaceSwipe(delta);
}

Is it correct that it always reads gestures:workspace_swipe_invert or should it read gestures:workspace_swipe_touch_invert under certain circumstances?

Is it ready for merging, or does it need work?

Wait for answer by @earboxer

@khachbe
Copy link
Contributor

khachbe commented Jul 24, 2024

My bad, I must have missed that

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@vaxerski vaxerski merged commit 2da3cfb into hyprwm:main Jul 24, 2024
11 checks passed
@leon-erd leon-erd deleted the touch_invert branch July 24, 2024 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

workspace_swipe_touch_invert incorrect behaviour
3 participants