touchpad: split handling the state into a separate function
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 1 Sep 2014 07:05:49 +0000 (17:05 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 18 Sep 2014 03:29:39 +0000 (13:29 +1000)
No functional changes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
src/evdev-mt-touchpad.c

index d831b83..7202a66 100644 (file)
@@ -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;
        }
 }