[PATCH weston 3/3] eventdemo: do not print axis events if not requested
Benoit Gschwind
gschwind at gnu-log.net
Fri May 13 09:03:36 UTC 2016
Hello Pekka,
Reviewed-by: Benoit Gschwind <gschwind at gnu-log.net>
Tested-by: Benoit Gschwind <gschwind at gnu-log.net>
That surprising that the log_axis was not used here :)
Best regards,
Benoit Gschwind
On 10/05/2016 16:11, Pekka Paalanen wrote:
> From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>
> Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> ---
> clients/eventdemo.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/clients/eventdemo.c b/clients/eventdemo.c
> index 38eb904..64b3d01 100644
> --- a/clients/eventdemo.c
> +++ b/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);
> }
>
More information about the wayland-devel
mailing list