Repository navigation
fix: trackpad scrolling within viewport not working - #355
Open
kenmcgaugh wants to merge 2 commits into
Open
kenmcgaugh wants to merge 2 commits into
kenmcgaugh wants to merge 2 commits into
Conversation
Using trackpad scroll gestures wasn't working in the viewport due to 2 issues. First, the Qt wheel events were being sent to xstudio using the device type as the input type signature even though xstudio only handles those with an event type signature of Signature::InputType::Mouse. So this fix hard-codes that input type signature for all wheel events. Perhaps a more proper solution would be to add support on the xstudio side for events from different input types.
The next issue was in the following line:
anon_mail(playhead::step_atom_v, event->angleDelta().ry() > 0 ? 1 : -1)
When using a trackpad under macOS, the event's angleDelta() can be zero since the delta comes through the pixelData() instead. And the conditional would return -1 in that case, causing the scrubbing to be almost exclusively backwards.
Signed-off-by: Ken McGaugh <ken@mcgaugh.co.uk>
Contributor
|
Just a note to say, this is working great for me. Thanks for pushing it Ken! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using trackpad scroll gestures wasn't working in the viewport due to 2 issues. First, the Qt wheel events were being sent to xstudio using the device type as the input type signature even though xstudio only handles those with an event type signature of Signature::InputType::Mouse. So this fix hard-codes that input type signature for all wheel events. Perhaps a more proper solution would be to add support on the xstudio side for events from different input types.
The next issue was in the following line:
When using a trackpad under macOS, the event's angleDelta() can be zero since the delta comes through the pixelData() instead. And the conditional would return -1 in that case, causing the scrubbing to be almost exclusively backwards.
Note this has only been tested under macOS. It would be great if someone could test this on a windows laptop and also to test it doesn't break other device inputs (like wacom tablets).