From: Peter Hutterer Date: Mon, 1 Sep 2014 07:05:49 +0000 (+1000) Subject: touchpad: split handling the state into a separate function X-Git-Tag: 0.7.0~135 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=49e630376b024ca86214497f0ee0bdd4229ba0e1;p=platform%2Fupstream%2Flibinput.git touchpad: split handling the state into a separate function No functional changes Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede --- diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index d831b836..7202a663 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -593,6 +593,15 @@ tp_post_events(struct tp_dispatch *tp, uint64_t time) pointer_notify_motion(&tp->device->base, time, dx, dy); } +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, @@ -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; } }