]> git.mdlowis.com Git - proto/labwc.git/commitdiff
seat: fix configure condition for click method
authorJens Peters <jp7677@gmail.com>
Sat, 24 Feb 2024 18:12:56 +0000 (19:12 +0100)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sat, 24 Feb 2024 19:39:54 +0000 (20:39 +0100)
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

index 0f4219877b3c7aca923df3ccbfa07de3e96c3b6f..635945b16cc24e1a62fceab9fd6dd50313840520 100644 (file)
@@ -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 {