[PATCH libinput 01/14] evdev: move the fallback dispatch creation to evdev_configure_device

Peter Hutterer peter.hutterer at who-t.net
Thu Jul 21 00:31:49 UTC 2016


All the other devices are created in there too, unify that approach.

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

diff --git a/src/evdev.c b/src/evdev.c
index aeb21eb..1f77bc0 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -2290,6 +2290,8 @@ evdev_configure_device(struct evdev_device *device)
 		return false;
 	}
 
+	device->dispatch = fallback_dispatch_create(&device->base);
+
 	return true;
 }
 
@@ -2501,9 +2503,6 @@ evdev_device_create(struct libinput_seat *seat,
 		goto err;
 	}
 
-	/* If the dispatch was not set up use the fallback. */
-	if (device->dispatch == NULL)
-		device->dispatch = fallback_dispatch_create(&device->base);
 	if (device->dispatch == NULL)
 		goto err;
 
-- 
2.7.4



More information about the wayland-devel mailing list