mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-05 05:10:26 +01:00
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>
This commit is contained in:
parent
bd6fd8bb92
commit
586ac7c430
1 changed files with 3 additions and 3 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue