[PATCH libinput 15/17] touchpad: split handling the state into a separate function

Peter Hutterer peter.hutterer at who-t.net
Tue Sep 2 19:03:06 PDT 2014


No functional changes

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev-mt-touchpad.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index d831b83..cd31c48 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -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;
 	}
 }
-- 
1.9.3



More information about the wayland-devel mailing list