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

Enabling two finger middle mouse drag blocks scale and rotate gestures #111

Open
osresearch opened this issue Jun 23, 2021 · 0 comments
Open

Comments

@osresearch
Copy link

I want to enable middle finger dragging with two fingers, but without tapping, in order to have very smooth camera orbiting in Blender. I can select this mode by running:

xinput set-prop 'Apple Inc. Magic Trackpad 2' 'Trackpad Scroll Settings' 150 0 500
xinput set-prop 'Apple Inc. Magic Trackpad 2' 'Trackpad Scroll Buttons' 2 2 2 2

However, this breaks the other two finger gestures. Scale and Rotate events are no longer generated, so zooming in and out with pinching the trackpad in Blender no longer works. Switching the Trackpad Scroll Buttons back to 4 5 6 7 and the scale and rotate events come back, but there are no button presses for the motion events when doing the two finger drag.

I think the issue is this special case in get_button_for_dir():

int get_button_for_dir(const struct MConfigSwipe* cfg_swipe, int dir){
        switch (dir){
        case TR_NONE:
                if(cfg_swipe->up_btn == cfg_swipe->lt_btn && cfg_swipe->lt_btn == cfg_swipe->dn_btn && cfg_swipe->dn_btn == cfg_swipe->rt_btn)
                        return cfg_swipe->up_btn;
                return -1;

Since a button is returned even when there is no motion, the trigger_swipe_unsafe() decides that it is a scroll event and starts processing it immediately.

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

1 participant