From 61c986a4a851ed0d7d749d3d6df55832b6f72718 Mon Sep 17 00:00:00 2001 From: ribet Date: Tue, 18 Jul 2017 15:43:12 +0000 Subject: Fixed xinput2 bindings for stretch --- debian/changelog | 6 ++++++ src/ivypointer.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 863319b..f26c371 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ivypointer (0.0.9) unstable; urgency=low + + * fixed xinput2 bindings for stretch + + -- Philippe Ribet Tue, 18 Jul 2017 17:43:00 +0200 + ivypointer (0.0.8) unstable; urgency=low * plein de trucs de benjamin pour xinpout 2 diff --git a/src/ivypointer.c b/src/ivypointer.c index 6a38165..47ab6ac 100644 --- a/src/ivypointer.c +++ b/src/ivypointer.c @@ -93,8 +93,8 @@ #define CHAMP_X_WACOM_PREDICTIVE_BUTTON 9 #define CHAMP_Y_WACOM_PREDICTIVE_BUTTON 10 -#define REGEXP_POINTER_2 "^InputMoveEvent %s Abs_X=(.*) Abs_Y=(.*).*(unknown=.*)? time=(.*)" -#define REGEXP_BUTTON_WACOM_2 "^InputButtonEvent %s num=(.*) state=(.*) Abs_X=(.*) Abs_Y=(.*).*(unknown=.*)? time=(.*)" +#define REGEXP_POINTER_2 "^InputMoveEvent %s Abs_X=(\\S*) Abs_Y=(\\S*) Abs_Pressure=(\\S*).* time=(.*)" +#define REGEXP_BUTTON_WACOM_2 "^InputButtonEvent %s num=(.*) state=(.*) Abs_X=(.*) Abs_Y=(.*) Abs_Pressure=(\\S*).* time=(.*)" #define CHAMP_X_WACOM_2 1 #define CHAMP_Y_WACOM_2 2 @@ -387,7 +387,7 @@ static void CallbackPointer (IvyClientPtr app, void *user_data, int argc, char * float x = atof(argv[champX]); // predicted position float y = atof(argv[champY]); // predicted position int time = atoi(argv[champTime]); - int presure = atoi(argv[champPressure]); + int pressure = atoi(argv[champPressure]); static int old_time = 0; static int should_click = 0; static int clicked = 0; @@ -412,7 +412,7 @@ static void CallbackPointer (IvyClientPtr app, void *user_data, int argc, char * int dt = time-old_time; // if (old_time) // printf("time=%d, old_time=%d, dt=%d\n",time, old_time, dt); - if (presure > 0) { + if (pressure > 0) { if (!should_click){ old_time = time; dt = 0; @@ -452,7 +452,7 @@ static void CallbackPointer (IvyClientPtr app, void *user_data, int argc, char * } // release (common of both modes) - if (dragged && presure==0){ + if (dragged && pressure==0){ fakeMouseButton(1,0,x,y); dragged = 0; } -- cgit v1.1