[PATCH libinput 15/17] touchpad: split handling the state into a separate function

Hans de Goede hdegoede at redhat.com
Sun Sep 14 03:23:35 PDT 2014


Hi,

On 09/03/2014 04:03 AM, Peter Hutterer wrote:
> No functional changes
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>


Looks good:

Reviewed-by: Hans de Goede <hdegoede at redhat.com>

Regards,

Hans

> ---
>  src/evdev-mt-touchpad.c | 13 ++++++++++---
>  1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
> index d831b83..cd31c48 100644
> --- a/src/evdev-mt-touchpad.c
> +++ b/src/evdev-mt-touchpad.c
> @@ -594,6 +594,15 @@ tp_post_events(struct tp_dispatch *tp, uint64_t time)
>  }
>  
>  static void
> +tp_handle_state(struct tp_dispatch *tp,
> +		uint64_t time)
> +{
> +		tp_process_state(tp, time);
> +		tp_post_events(tp, time);
> +		tp_post_process_state(tp, time);
> +}
> +
> +static void
>  tp_process(struct evdev_dispatch *dispatch,
>  	   struct evdev_device *device,
>  	   struct input_event *e,
> @@ -613,9 +622,7 @@ tp_process(struct evdev_dispatch *dispatch,
>  		tp_process_key(tp, e, time);
>  		break;
>  	case EV_SYN:
> -		tp_process_state(tp, time);
> -		tp_post_events(tp, time);
> -		tp_post_process_state(tp, time);
> +		tp_handle_state(tp, time);
>  		break;
>  	}
>  }
> 


More information about the wayland-devel mailing list