summaryrefslogtreecommitdiff
path: root/src/libinput.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2015-04-15 10:21:47 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2015-04-15 10:38:01 +1000
commit586ac7c4300dfec114a7f8a6f4288b2a2fdef64f (patch)
tree47ec1fb6340b2334ebc881832993622b732e492c /src/libinput.c
parentbd6fd8bb9292ece29fcbd574331dc93cf63263e5 (diff)
Return INVALID before UNSUPPORTED for click methods
All other config options already follow this behavior. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/libinput.c')
-rw-r--r--src/libinput.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libinput.c b/src/libinput.c
index bcb2509..980b44a 100644
--- a/src/libinput.c
+++ b/src/libinput.c
@@ -1929,9 +1929,6 @@ LIBINPUT_EXPORT enum libinput_config_status
libinput_device_config_click_set_method(struct libinput_device *device,
enum libinput_config_click_method method)
{
- if ((libinput_device_config_click_get_methods(device) & method) != method)
- return LIBINPUT_CONFIG_STATUS_UNSUPPORTED;
-
/* Check method is a single valid method */
switch (method) {
case LIBINPUT_CONFIG_CLICK_METHOD_NONE:
@@ -1942,6 +1939,9 @@ libinput_device_config_click_set_method(struct libinput_device *device,
return LIBINPUT_CONFIG_STATUS_INVALID;
}
+ if ((libinput_device_config_click_get_methods(device) & method) != method)
+ return LIBINPUT_CONFIG_STATUS_UNSUPPORTED;
+
if (device->config.click_method)
return device->config.click_method->set_method(device, method);
else /* method must be _NONE to get here */