diff options
author | ribet | 2017-07-18 15:43:12 +0000 |
---|---|---|
committer | ribet | 2017-07-18 15:43:12 +0000 |
commit | 61c986a4a851ed0d7d749d3d6df55832b6f72718 (patch) | |
tree | 23be15a16e43da29d3075ad2e57107ec92ff2d2b /src/ivypointer.c | |
parent | 8d0ec0d004f47478b62a10294d3785b6bad0cfbb (diff) | |
download | ivypointer-61c986a4a851ed0d7d749d3d6df55832b6f72718.zip ivypointer-61c986a4a851ed0d7d749d3d6df55832b6f72718.tar.gz ivypointer-61c986a4a851ed0d7d749d3d6df55832b6f72718.tar.bz2 ivypointer-61c986a4a851ed0d7d749d3d6df55832b6f72718.tar.xz |
Fixed xinput2 bindings for stretch
Diffstat (limited to 'src/ivypointer.c')
-rw-r--r-- | src/ivypointer.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |