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

Swipe to drag #96

Closed
wants to merge 15 commits into from
Closed

Swipe to drag #96

wants to merge 15 commits into from

Conversation

p2rkw
Copy link

@p2rkw p2rkw commented Jul 16, 2015

Based on top of my previous changes.

If you going to accept this PR, close previous one.

Resolves #91

vanilla-wow-addons and others added 15 commits July 10, 2015 21:25
…variable value.

    This corner case forces me to push my DLL060A:00 06CB:2734 trackpad really hard.
… and swipe4 gestures.

Till now gestures were delayed, but delay was before any button down event, so after first gesture you had to
"wait" for button down event, and button up was fired immediately after button down. It was like:
0 ms: gesture was made
... : delay for configured number of miliseconds
x ms: send button down and button up events (othen multiple times).
As a result actions bound to gestures via tools like xbindkeys were executed too late and othen more than once.
This comes from fact that xserver can "see" generated events only when 'read_input' callback returns.

To fix that I had to modify code to generate and "commit" buttown down events as fast as possible, and
use timer to be able to fire delayed button up events.
Actual flow looks like:
0 ms: gesture was made, button down
...: delay
x ms: one button up event
 and so on.

During development I merged code and data structures responsible for gestures configuration and execution.
Two finger scroll, swipes and four finger swipes are now executed by same function.
There are still some areas to merge, mostly in 'moving_update' and configuration code, but I didn't pushed it
further right now.

I also find and fixed bug with "ClickTime" property: it was set, but it wasn't used. Now taps will delay
button up for configured amount of time. Be aware to not set it to higher value than tap to drag wait time.
Otherwise delayed button up event may interrupt dragging.
…all four directions, but separate for gestures.

I guess most users would set all four variables to one value.
Also from this point delayed events will be fired early when user finish his gesture before even if it was scheduled for later.
So my earlier notes about too high tap click time and tap to drag are no longer valid: button up event will be send right after releasing any of touches.
The problem is swipe drag send motion events much slower than one finger motion.
Is it my fault, mtrack, mtdev or my touchpad?
…hing for source of huge delays and

found bugs in set_swipe_property.
This commit schold be removed/reverted.
…wn for xserver and user as "Trackpad {Scroll,Swipe,Swipe4} Settings".

Fixed bug in set_swipe_properties: now error code is handled correctly.
Changed few variable names to follow convention.
Conflicts:
	driver/mprops.c
	include/mprops.h
	src/mconfig.c
…le searching for source of huge delays and"

This reverts commit a4f206b.

Conflicts:
	driver/mprops.c
	src/mconfig.c
Swipe to drag is working, but I have to clean code, and implement "infinite timer" for hold == 0.

Updated readme and renamed property to "{Scroll,Swipe,Swipe4}Sensivity". Renamed variable to drag_sens.
… of Trackpad * Settings) will be treated

as infinite time. For 0 timer will be not set so button up event will be generated when user ends his gesture.

Additionally I cleanup code related to delays, removed delayed_delta member because it were duplicating delayed_time.

Some cleanups.
@@ -25,7 +25,15 @@ This is a standard autoconf package. So:
make && make install

It is likely that you will need to change system-dependent paths such as the
xorg module directory. See `configure --help` for options.
xorg module directory. Otherwise mtrack may be not installed in xserver search
Copy link
Owner

Choose a reason for hiding this comment

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

Thanks for the additional comment on the xorg module directory. However, I would like to keep distro specific packaging information out of the README. Please remove it.

@rynbrd
Copy link
Owner

rynbrd commented Jul 27, 2015

Sensitivity should be a float with a default value of 1. This is conventional for input devices and is consistent with the pointer sensitivity option in this driver.

@rynbrd
Copy link
Owner

rynbrd commented Jul 27, 2015

There are quite a few grammatical errors in the README changes. The modifications to the existing config options in the README become less clear as a result. I would rather you not include these changes and clean up the grammatical mistakes in the new configuration value descriptions.

@rynbrd
Copy link
Owner

rynbrd commented Jul 27, 2015

I'm afraid I can't merge this given it conflicts with high precision scrolling. See my notes on your other PR. This PR is huge and even if I had the time to step through every change I'm afraid I just don't understand most of them.

@p2rkw
Copy link
Author

p2rkw commented Jul 27, 2015

it conflicts with high precision scrolling

High precision scrolling code relays on duplicated (copy pasted) code which I always try to cut out.
Thus it seems future merge will be time consuming,

@p2rkw
Copy link
Author

p2rkw commented Jul 30, 2015

In this case I will wait with rebase and fixes till you merge high precision scrolling and other PRs.

@p2rkw p2rkw closed this Oct 30, 2016
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.

Support for 3-Finger Drag?
3 participants