eventdemo: do not print axis events if not requested

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>
Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
dev
Pekka Paalanen 9 years ago
parent 10e92db1d3
commit 0baffb0fd3
  1. 9
      clients/eventdemo.c

@ -288,6 +288,9 @@ axis_source_handler(struct widget *widget, struct input *input,
const char *axis_source;
struct eventdemo *e = data;
if (!log_axis)
return;
e->print_pointer_frame = true;
switch (source) {
@ -315,6 +318,9 @@ axis_stop_handler(struct widget *widget, struct input *input,
{
struct eventdemo *e = data;
if (!log_axis)
return;
e->print_pointer_frame = true;
printf("axis stop time: %d, axis: %s\n",
time,
@ -328,6 +334,9 @@ axis_discrete_handler(struct widget *widget, struct input *input,
{
struct eventdemo *e = data;
if (!log_axis)
return;
e->print_pointer_frame = true;
printf("axis discrete axis: %d value: %d\n", axis, discrete);
}

Loading…
Cancel
Save