evdev: split resetting to a neutral state out
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 5 Sep 2016 05:00:51 +0000 (15:00 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 7 Sep 2016 01:17:03 +0000 (11:17 +1000)
No functional changes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
src/evdev.c

index 7c668b1..3b48c3e 100644 (file)
@@ -1160,10 +1160,9 @@ release_pressed_keys(struct fallback_dispatch *dispatch,
 }
 
 static void
-fallback_suspend(struct evdev_dispatch *evdev_dispatch,
-                struct evdev_device *device)
+fallback_return_to_neutral_state(struct fallback_dispatch *dispatch,
+                                struct evdev_device *device)
 {
-       struct fallback_dispatch *dispatch = (struct fallback_dispatch*)evdev_dispatch;
        struct libinput *libinput = evdev_libinput_context(device);
        uint64_t time;
 
@@ -1176,6 +1175,15 @@ fallback_suspend(struct evdev_dispatch *evdev_dispatch,
 }
 
 static void
+fallback_suspend(struct evdev_dispatch *evdev_dispatch,
+                struct evdev_device *device)
+{
+       struct fallback_dispatch *dispatch = (struct fallback_dispatch*)evdev_dispatch;
+
+       fallback_return_to_neutral_state(dispatch, device);
+}
+
+static void
 fallback_destroy(struct evdev_dispatch *evdev_dispatch)
 {
        struct fallback_dispatch *dispatch = (struct fallback_dispatch*)evdev_dispatch;