From 598516d808784c928700d4416488f3574c55244d Mon Sep 17 00:00:00 2001 From: will Date: Sat, 17 Oct 2020 13:52:53 +0200 Subject: Added basic tap-to-click for touchpad users --- dwl.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dwl.c') diff --git a/dwl.c b/dwl.c index 730e46a..69485ec 100644 --- a/dwl.c +++ b/dwl.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -33,6 +34,7 @@ #include #include #include +#include #include #include #ifdef XWAYLAND @@ -603,6 +605,10 @@ createnotify(struct wl_listener *listener, void *data) void createpointer(struct wlr_input_device *device) { + struct libinput_device *libinput_device = (struct libinput_device*) + wlr_libinput_get_device_handle(device); + if (tap_to_click && libinput_device_config_tap_get_finger_count(libinput_device)) + libinput_device_config_tap_set_enabled(libinput_device, LIBINPUT_CONFIG_TAP_ENABLED); /* We don't do anything special with pointers. All of our pointer handling * is proxied through wlr_cursor. On another compositor, you might take this * opportunity to do libinput configuration on the device to set -- cgit v1.2.3