diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-04-16 12:30:24 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-04-16 12:30:24 +0200 |
commit | 2d62ce153a386d8c67dfd0d965d746a754ef4129 (patch) | |
tree | c7ce4c59eceb3b6eb179ae8075597ac49143dde7 /kbd.c | |
parent | 5737cf1d24c868a55eafc59a51c000dc7f4f63f6 (diff) | |
download | fbida-2d62ce153a386d8c67dfd0d965d746a754ef4129.tar.gz |
logind tweaks
Diffstat (limited to 'kbd.c')
-rw-r--r-- | kbd.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -12,6 +12,7 @@ #include <sys/stat.h> #include "kbd.h" +#include "logind.h" #ifdef SYSTEM_LINUX # include <linux/input.h> @@ -295,7 +296,7 @@ const struct libinput_interface libinput_if_default = { static struct libinput *ctx; -void kbd_init(int use_libinput, dev_t gfx) +void kbd_init(bool use_libinput, bool use_logind, dev_t gfx) { struct udev *udev; struct udev_device *ugfx; @@ -308,7 +309,10 @@ void kbd_init(int use_libinput, dev_t gfx) seat = udev_device_get_property_value(ugfx, "ID_SEAT"); if (!seat) seat = "seat0"; - ctx = libinput_udev_create_context(&libinput_if_default, NULL, udev); + ctx = libinput_udev_create_context(use_logind + ? &libinput_if_logind + : &libinput_if_default, + NULL, udev); libinput_udev_assign_seat(ctx, seat); fprintf(stderr, "kbd: using libinput (%d devices, %s)\n", libinput_devcount, seat); |