aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ivypointer.c10
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;
}