[PATCH libinput 10/11] touchpad: Refactor tp_get_*_touches_delta
Hans de Goede
hdegoede at redhat.com
Mon Feb 23 01:09:08 PST 2015
Hi,
On 23-02-15 04:02, Peter Hutterer wrote:
> On Wed, Feb 18, 2015 at 01:26:53PM +0100, Hans de Goede wrote:
>> The two tp_get_*_touches_delta functions are almost identical, refactor
>> them into one function.
>>
>> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
>> ---
>
> ACK to the basics, but I'd like to leave the two calls in place and make
> them call into a static inline with the boolean argument.
>
> i.d.
> static inline
> tp_get_touches_delta(...) {
> ..
> }
>
> void
> tp_get_average_touches_delta(..) {
> tp_get_touches_delta(..., true);
> }
>
> In the actual touchpad code, a call like
> tp_get_average_touches_delta(tp, &dx, &dy);
> is a lot more expressive than a "true" or "false".
Good idea, fixed in my personal tree.
Regards,
Hans
More information about the wayland-devel
mailing list