diff options
author | monsta <[email protected]> | 2016-12-23 13:19:41 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2017-01-02 16:53:33 +0300 |
commit | 8872b8fdd4e201031997e65fd1721ec785984d0d (patch) | |
tree | e3062b91cc4fe605a155a892767ff70ee2c7f196 /plugins/mouse | |
parent | 4bb98214c441bfc870af156b71ea059ea6e5ec58 (diff) | |
download | mate-settings-daemon-8872b8fdd4e201031997e65fd1721ec785984d0d.tar.bz2 mate-settings-daemon-8872b8fdd4e201031997e65fd1721ec785984d0d.tar.xz |
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
Diffstat (limited to 'plugins/mouse')
-rw-r--r-- | plugins/mouse/msd-mouse-manager.c | 35 |
1 files 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; @@ -765,6 +765,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) { int numdevices, i; |