mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-01-05 11:30:22 +01:00
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>
This commit is contained in:
parent
10e92db1d3
commit
0baffb0fd3
1 changed files with 9 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue