From 9456b50983e2a90d72c3cb5de80636bed4ce728f Mon Sep 17 00:00:00 2001 From: Jens Peters Date: Sat, 24 Feb 2024 19:12:56 +0100 Subject: [PATCH] seat: fix configure condition for click method Exclude none (zero) from the bitmask test , otherwise the bitmask test is always true when click method is configured to 'none' and as a result the configuration will be skipped. --- src/seat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/seat.c b/src/seat.c index 0f421987..635945b1 100644 --- a/src/seat.c +++ b/src/seat.c @@ -189,8 +189,10 @@ configure_libinput(struct wlr_input_device *wlr_input_device) wlr_log(WLR_INFO, "dwt configured"); libinput_device_config_dwt_set_enabled(libinput_dev, dc->dwt); } - if ((libinput_device_config_click_get_methods(libinput_dev) - & dc->click_method) == 0 + + if ((dc->click_method != LIBINPUT_CONFIG_CLICK_METHOD_NONE + && (libinput_device_config_click_get_methods(libinput_dev) + & dc->click_method) == 0) || dc->click_method < 0) { wlr_log(WLR_INFO, "click method not configured"); } else {