Skip to content

Conversation

@nanoant
Copy link
Contributor

@nanoant nanoant commented Jul 27, 2022

This is the second attempt to distinguish trackpad scrolling that when used
should yield panning from Magic Mouse scrolling that should control zoom.

Since trackpad will begin with a touch prior to the scroll event, but Magic
Mouse not, we can use it to make sure we trigger panning only on a trackpad.

Previous "mac: Don't interpret single-touch scroll events as pan gestures"
that was flawed was reverted which ultimately lead to being unable to zoom using
Magic Mouse.

This fixes again #1107 and is also related to #1218

@ruevs
Copy link
Member

ruevs commented Jul 28, 2022

Just for cross-reference - the original issue is here #1106

@phkahler phkahler requested a review from vespakoen July 29, 2022 15:24
@vespakoen
Copy link
Contributor

I just compiled this and I still have the issue that when I scroll fast, in stead of panning SolveSpace zooms instead.

Maybe we should not pan with 2 finger scroll, and use mouse-down-drag to pan (like it was in the past, I think?)

This is the second attempt to distinguish trackpad scrolling that when used
should yield panning from Magic Mouse scrolling that should control zoom.

Since trackpad will begin with a touch prior to the scroll event, but Magic
Mouse not, we can use it to make sure we trigger panning only on a trackpad.

Previous "mac: Don't interpret single-touch scroll events as pan gestures"
that was flawed was reverted which ultimately lead to being unable to zoom using
Magic Mouse.
@nanoant nanoant force-pushed the mac/distinguish-trackpad branch from 9cad14a to 0f4d966 Compare August 17, 2022 18:34
@nanoant
Copy link
Contributor Author

nanoant commented Aug 17, 2022

@vespakoen Thanks for the report. I managed to reproduce and then fix the problem. Can you pull the latest update.

TL;DR Actually we can have multiple touches when we accidentally touch trackpad with another finger when scrolling fast. Using counter instead of simple flag seems to resolve the problem to me and I am no longer able to trigger zoom with scrolling widely on my MBP with 2 fingers, while Magic Mouse on my Mini works great as well.

@vespakoen
Copy link
Contributor

This is working for me now as well.

Thanks for working on this and figuring out a way to distinguish between mice ;)

Merging...

@vespakoen vespakoen merged commit cf4defc into solvespace:master Aug 17, 2022
@ruevs ruevs mentioned this pull request Oct 4, 2022
devin-ai-integration bot pushed a commit to erkinalp/solvespace that referenced this pull request Apr 3, 2025
This is the second attempt to distinguish trackpad scrolling that when used
should yield panning from Magic Mouse scrolling that should control zoom.

Since trackpad will begin with a touch prior to the scroll event, but Magic
Mouse not, we can use it to make sure we trigger panning only on a trackpad.

Previous "mac: Don't interpret single-touch scroll events as pan gestures"
that was flawed was reverted which ultimately lead to being unable to zoom using
Magic Mouse.
dennisyangji pushed a commit to Orthogonalpub/ode_solvespace that referenced this pull request Nov 25, 2025
This is the second attempt to distinguish trackpad scrolling that when used
should yield panning from Magic Mouse scrolling that should control zoom.

Since trackpad will begin with a touch prior to the scroll event, but Magic
Mouse not, we can use it to make sure we trigger panning only on a trackpad.

Previous "mac: Don't interpret single-touch scroll events as pan gestures"
that was flawed was reverted which ultimately lead to being unable to zoom using
Magic Mouse.
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

Successfully merging this pull request may close these issues.

3 participants