From e8d8abfbb50a8992a0aa1a8c1e7fa99b8aae8248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Winiarski?= Date: Tue, 25 Oct 2016 22:03:58 +0200 Subject: Add left_handed support for input devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some users may want to switch buttons on their input devices, turns out libinput already supports it. Let's add a support for it in our config. Signed-off-by: MichaƂ Winiarski --- sway/config.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sway/config.c') diff --git a/sway/config.c b/sway/config.c index 1c460d31..7a41a3c8 100644 --- a/sway/config.c +++ b/sway/config.c @@ -832,6 +832,10 @@ void apply_input_config(struct input_config *ic, struct libinput_device *dev) { sway_log(L_DEBUG, "apply_input_config(%s) dwt_set_enabled(%d)", ic->identifier, ic->dwt); libinput_device_config_dwt_set_enabled(dev, ic->dwt); } + if (ic->left_handed != INT_MIN) { + sway_log(L_DEBUG, "apply_input_config(%s) left_handed_set_enabled(%d)", ic->identifier, ic->left_handed); + libinput_device_config_left_handed_set(dev, ic->left_handed); + } if (ic->middle_emulation != INT_MIN) { sway_log(L_DEBUG, "apply_input_config(%s) middle_emulation_set_enabled(%d)", ic->identifier, ic->middle_emulation); libinput_device_config_middle_emulation_set_enabled(dev, ic->middle_emulation); -- cgit v1.2.3