diff options
author | Peter Osterlund <petero2@telia.com> | 2003-09-25 01:37:13 +0200 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2006-04-09 04:01:12 +0200 |
commit | a37a1239a79d0147dbd76e7346108d4b7a836864 (patch) | |
tree | 507aa7a47fa006d5ec858eed039fe98497bdb6c8 /synclient.c | |
parent | fe3d1e6d2bae13264eb85d2466d1e8c78686d993 (diff) |
Added support for the new 2.6 kernel events ABS_TOOL_WIDTH,
BTN_TOOL_FINGER, BTN_TOOL_DOUBLETAP and BTN_TOOL_TRIPLETAP. Note that
this swaps the direction of the Y axis internally to match X and the
linux input subsystem. Because of this, the TopEdge and BottomEdge
parameters must be modified in the config file. There is some backwards
compatibility code for old 2.5/2.6 kernels that will probably be
deleted later.
Diffstat (limited to 'synclient.c')
-rw-r--r-- | synclient.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/synclient.c b/synclient.c index e9f40fe..2aacacf 100644 --- a/synclient.c +++ b/synclient.c @@ -133,14 +133,15 @@ static void set_variables(SynapticsSHM* synshm, int argc, char* argv[], int firs static int is_equal(SynapticsSHM* s1, SynapticsSHM* s2) { - return ((s1->x == s2->x) && - (s1->y == s2->y) && - (s1->z == s2->z) && - (s1->w == s2->w) && - (s1->left == s2->left) && - (s1->right == s2->right) && - (s1->up == s2->up) && - (s1->down == s2->down)); + return ((s1->x == s2->x) && + (s1->y == s2->y) && + (s1->z == s2->z) && + (s1->numFingers == s2->numFingers) && + (s1->fingerWidth == s2->fingerWidth) && + (s1->left == s2->left) && + (s1->right == s2->right) && + (s1->up == s2->up) && + (s1->down == s2->down)); } static void monitor(SynapticsSHM* synshm, int delay) @@ -152,8 +153,9 @@ static void monitor(SynapticsSHM* synshm, int delay) while(1) { SynapticsSHM cur = *synshm; if (!is_equal(&old, &cur)) { - printf("x:%4d y:%4d z:%3d w:%2d left:%d right:%d up:%d down:%d\n", - cur.x, cur.y, cur.z, cur.w, cur.left, cur.right, cur.up, cur.down); + printf("x:%4d y:%4d z:%3d f:%1d w:%2d left:%d right:%d up:%d down:%d\n", + cur.x, cur.y, cur.z, cur.numFingers, cur.fingerWidth, + cur.left, cur.right, cur.up, cur.down); old = cur; } usleep(delay * 1000); |