touchpad: split handling the state into a separate function

No functional changes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Peter Hutterer 2014-09-01 17:05:49 +10:00
parent bd7f7e8a08
commit 49e630376b

View file

@ -593,6 +593,15 @@ tp_post_events(struct tp_dispatch *tp, uint64_t time)
pointer_notify_motion(&tp->device->base, time, dx, dy); 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 static void
tp_process(struct evdev_dispatch *dispatch, tp_process(struct evdev_dispatch *dispatch,
struct evdev_device *device, struct evdev_device *device,
@ -613,9 +622,7 @@ tp_process(struct evdev_dispatch *dispatch,
tp_process_key(tp, e, time); tp_process_key(tp, e, time);
break; break;
case EV_SYN: case EV_SYN:
tp_process_state(tp, time); tp_handle_state(tp, time);
tp_post_events(tp, time);
tp_post_process_state(tp, time);
break; break;
} }
} }