summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/grail-api.c10
-rw-r--r--src/grail-impl.h1
2 files changed, 9 insertions, 2 deletions
diff --git a/src/grail-api.c b/src/grail-api.c
index 9490659..d4ad83d 100644
--- a/src/grail-api.c
+++ b/src/grail-api.c
@@ -80,8 +80,14 @@ static void handle_abs_events(struct grail *ge, const struct input_event *syn)
80 impl->pointer_status = pointer; 80 impl->pointer_status = pointer;
81 } 81 }
82 if (pointer) { 82 if (pointer) {
83 evput(impl, syn->time, EV_ABS, ABS_X, impl->pointer_x); 83 if (impl->report_x != impl->pointer_x) {
84 evput(impl, syn->time, EV_ABS, ABS_Y, impl->pointer_y); 84 evput(impl, syn->time, EV_ABS, ABS_X, impl->pointer_x);
85 impl->report_x = impl->pointer_x;
86 }
87 if (impl->report_y != impl->pointer_y) {
88 evput(impl, syn->time, EV_ABS, ABS_Y, impl->pointer_y);
89 impl->report_y = impl->pointer_y;
90 }
85 } 91 }
86} 92}
87 93
diff --git a/src/grail-impl.h b/src/grail-impl.h
index 66fe4c7..af84a6c 100644
--- a/src/grail-impl.h
+++ b/src/grail-impl.h
@@ -32,6 +32,7 @@ struct grail_impl {
32 int filter_abs; 32 int filter_abs;
33 int pointer_status; 33 int pointer_status;
34 int pointer_x, pointer_y; 34 int pointer_x, pointer_y;
35 int report_x, report_y;
35}; 36};
36 37
37#endif 38#endif