[PATCH] libinput-device: Remove unnecessary function call

Bryce Harrington bryce at osg.samsung.com
Sat Feb 20 02:30:20 UTC 2016


On Fri, Feb 19, 2016 at 11:07:00AM -0500, Chris Michael wrote:
> When we handle pointer button events, we already retrieve the button
> state at the top of this function, so there is no real need to call
> the same function again as we can just reuse the 'button_state'
> variable that we have above.
> 
> Signed-off-by: Chris Michael <cpmichael at osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>

> ---
>  src/libinput-device.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libinput-device.c b/src/libinput-device.c
> index 99b2916..78b0ac9 100644
> --- a/src/libinput-device.c
> +++ b/src/libinput-device.c
> @@ -154,7 +154,8 @@ handle_pointer_button(struct libinput_device *libinput_device,
>  	notify_button(device->seat,
>  		      libinput_event_pointer_get_time(pointer_event),
>  		      libinput_event_pointer_get_button(pointer_event),
> -		      libinput_event_pointer_get_button_state(pointer_event));
> +                      button_state);
> +
>  	return true;
>  }
>  
> -- 
> 2.7.0
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list