diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-12-24 08:17:41 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-24 08:17:41 -0800 |
commit | a081b3bf7b99c0e044da26cd00fc74e367c66e63 (patch) | |
tree | a701435397e2722cb114ab0c0598081535cba394 /rootston/input.c | |
parent | e04d3501133dc0c73bb43af323bca51ab0b352a1 (diff) | |
parent | e85c2827c8929ed39d0931ba054047b0a35e7dcc (diff) |
Merge pull request #518 from martinetd/libinput_config
rootston: add arbitrary libinput config 'tap_enabled'
Diffstat (limited to 'rootston/input.c')
-rw-r--r-- | rootston/input.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rootston/input.c b/rootston/input.c index a3904a61..74ce59d0 100644 --- a/rootston/input.c +++ b/rootston/input.c @@ -5,6 +5,7 @@ #include <wlr/util/log.h> #include <wlr/xcursor.h> #include <wlr/xwayland.h> +#include <wlr/backend/libinput.h> #include "rootston/server.h" #include "rootston/config.h" #include "rootston/input.h" @@ -60,6 +61,17 @@ static void input_add_notify(struct wl_listener *listener, void *data) { device->vendor, device->product, device_type(device->type), seat_name); roots_seat_add_device(seat, device); + + if (dc && wlr_input_device_is_libinput(device)) { + struct libinput_device *libinput_dev = + wlr_libinput_get_device_handle(device); + + wlr_log(L_DEBUG, "input has config, tap_enabled: %d\n", dc->tap_enabled); + if (dc->tap_enabled) { + libinput_device_config_tap_set_enabled(libinput_dev, + LIBINPUT_CONFIG_TAP_ENABLED); + } + } } static void input_remove_notify(struct wl_listener *listener, void *data) { |