From 8872b8fdd4e201031997e65fd1721ec785984d0d Mon Sep 17 00:00:00 2001 From: monsta Date: Fri, 23 Dec 2016 13:19:41 +0300 Subject: mouse: libinput - hook up tapping configuration note: libinput function doesn't use additional arguments since no button remapping is needed for it adapted from: https://github.com/linuxmint/cinnamon-settings-daemon/commit/85510232d53e8ed98697e9a7e3cc33274a531e19 --- plugins/mouse/msd-mouse-manager.c | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/plugins/mouse/msd-mouse-manager.c b/plugins/mouse/msd-mouse-manager.c index bed7d88..80d19f2 100644 --- a/plugins/mouse/msd-mouse-manager.c +++ b/plugins/mouse/msd-mouse-manager.c @@ -710,12 +710,12 @@ get_touchpad_handedness (MsdMouseManager *manager, } static void -set_tap_to_click (XDeviceInfo *device_info, - gboolean state, - gboolean left_handed, - gint one_finger_tap, - gint two_finger_tap, - gint three_finger_tap) +set_tap_to_click_synaptics (XDeviceInfo *device_info, + gboolean state, + gboolean left_handed, + gint one_finger_tap, + gint two_finger_tap, + gint three_finger_tap) { XDevice *device; int format, rc; @@ -764,6 +764,29 @@ set_tap_to_click (XDeviceInfo *device_info, } } +static void +set_tap_to_click_libinput (XDeviceInfo *device_info, + gboolean state) +{ + touchpad_set_bool (device_info, "libinput Tapping Enabled", 0, state); +} + +static void +set_tap_to_click (XDeviceInfo *device_info, + gboolean state, + gboolean left_handed, + gint one_finger_tap, + gint two_finger_tap, + gint three_finger_tap) +{ + if (property_from_name ("Synaptics Tap Action")) + set_tap_to_click_synaptics (device_info, state, left_handed, + one_finger_tap, two_finger_tap, three_finger_tap); + + if (property_from_name ("libinput Tapping Enabled")) + set_tap_to_click_libinput (device_info, state); +} + static void set_tap_to_click_all (MsdMouseManager *manager) { -- cgit v1.2.1