summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2019-06-06 11:17:42 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2019-06-11 15:49:02 +1000
commit36284defd05bf0dc89516e0ee381af86e703e45b (patch)
treed9818ffe55b46d715a86b169352984b1d3d66d67 /src
parent03a1c496eebe51d69e0e8226532ec4a3523b260e (diff)
downloadlibinput-36284defd05bf0dc89516e0ee381af86e703e45b.tar.gz
path: initialize the quirks context after error checking
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/path-seat.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/path-seat.c b/src/path-seat.c
index 48e8c683..5ed239f9 100644
--- a/src/path-seat.c
+++ b/src/path-seat.c
@@ -377,13 +377,6 @@ libinput_path_add_device(struct libinput *libinput,
return NULL;
}
- /* We cannot do this during path_create_context because the log
- * handler isn't set up there but we really want to log to the right
- * place if the quirks run into parser errors. So we have to do it
- * on the first call to add_device.
- */
- libinput_init_quirks(libinput);
-
udev_device = udev_device_from_devnode(libinput, udev, path);
if (!udev_device) {
log_bug_client(libinput, "Invalid path %s\n", path);
@@ -395,6 +388,13 @@ libinput_path_add_device(struct libinput *libinput,
return NULL;
}
+ /* We cannot do this during path_create_context because the log
+ * handler isn't set up there but we really want to log to the right
+ * place if the quirks run into parser errors. So we have to do it
+ * on the first call to add_device.
+ */
+ libinput_init_quirks(libinput);
+
device = path_create_device(libinput, udev_device, NULL);
udev_device_unref(udev_device);
return device;