Comments (1)
I think I've found the problem:
See this line of code: https://github.com/BlueDragonX/xf86-input-mtrack/blob/master/src/gestures.c#L572
t1->direction and t2->direction do not get checked if they are valid directions (see https://github.com/BlueDragonX/xf86-input-mtrack/blob/797719796a53a24fa6cd72fc3909a490ed807bec/include/trig.h#L40 ). When one finger is not moving, one of the directions is TR_NONE, which as a number is -1.00
Now, when the other finger is moving upwards (0.00) or upper-left (6.00-7.99) the scrolling works, because the difference (trig_angles_acute) between -1.00 (TR_NONE) and 0.00 respectively 6.00-7.99 (overflow, like from 360° to 0°) is small enough.
When moving the other finger down or right (2.00, 4.00), the difference is >2 and therefore too big to trigger a scrolling event.
Now the bigger problem with this is: For some odd reason my touchpad (it's the touchscreen of an Galaxy S2 Smartphone (i9100), which has an Atmel MXT224 touchcontroller) always reports one direction as TR_NONE (-1.00) when moving two fingers?!? Example (moving 2 fingers upwards (=0.00)):
(II) t1dir: -1.00 , t2dir: 0.41
(II) t1dir: 0.00 , t2dir: -1.00
(II) t1dir: -1.00 , t2dir: 0.00
(II) t1dir: 0.00 , t2dir: -1.00
(II) t1dir: -1.00 , t2dir: 0.00
(II) t1dir: 0.00 , t2dir: -1.00
(II) t1dir: -1.00 , t2dir: 0.00
I did this to make scrolling possible anyways:
if (t1->direction == TR_NONE) // if no movement in t1
{
return trig_generalize(t2->direction); // use t2 only to determine direction
}
else if (t2->direction == TR_NONE) // and vice versa
{
return trig_generalize(t1->direction);
}
else if (trig_angles_acute(t1->direction, t2->direction) < 2.0) {
But the issue of the touchpad reporting one finger as TR_NONE when moving two of them remains, which bugs me since it renders the the other gestures (rotate, scale) unuseable...
from xf86-input-mtrack.
Related Issues (20)
- Xorg not using Mtrack HOT 2
- Driver would not load on MBP Early 2015 HOT 4
- Can't right-click on MacBookPro1,1 HOT 1
- Can't get mtrack working on Chromebook Pixel
- Best trackpad settings for Macbook Pro 12,1 HOT 1
- Xorg.0.Log spammed with mtrack Debug output
- fatal error: mtdev-mapping.h / CentOS HOT 6
- Mtrack freezes Ubuntu 16.04 on login screen
- Weird scrolling issue HOT 2
- How are configurations of multitouch features done?
- mtrack config file is not found in ubuntu 4.15.0-32-generic HOT 1
- Mouse sporadically moves when MBP lid closed and used in "docking" situation HOT 2
- Cannot load mtrack HOT 3
- Point people to active fork?
- Stops working after extended inactivity HOT 1
- Does this work with x11
- Immediately disables touchpad HOT 1
- Click on bottom of 2013 MBP touchpad not detected?
- Touchpad disabled at login screen HOT 3
- Four finger gestures do not work on a Dell XPS 13 9300 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xf86-input-mtrack.