mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 09:20:29 +01:00
path: initialize the quirks context after error checking
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
03a1c496ee
commit
36284defd0
1 changed files with 7 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue