mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-24 21:40:05 +01:00
udev: don't init the quirks until we checked all arguments
If we fail with an invalid argument, there's no need to initialize all the quirks beforehand. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
90216a010a
commit
a3ea7a6808
1 changed files with 7 additions and 7 deletions
|
|
@ -391,13 +391,6 @@ libinput_udev_assign_seat(struct libinput *libinput,
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* We cannot do this during udev_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
|
||||
* here since we can expect the log handler to be set up by now.
|
||||
*/
|
||||
libinput_init_quirks(libinput);
|
||||
|
||||
if (libinput->interface_backend != &interface_backend) {
|
||||
log_bug_client(libinput, "Mismatching backends.\n");
|
||||
return -1;
|
||||
|
|
@ -406,6 +399,13 @@ libinput_udev_assign_seat(struct libinput *libinput,
|
|||
if (input->seat_id != NULL)
|
||||
return -1;
|
||||
|
||||
/* We cannot do this during udev_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
|
||||
* here since we can expect the log handler to be set up by now.
|
||||
*/
|
||||
libinput_init_quirks(libinput);
|
||||
|
||||
input->seat_id = safe_strdup(seat_id);
|
||||
|
||||
if (udev_input_enable(&input->base) < 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue