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 --- src/ivypointer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ivypointer.c') 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