mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 00:50:42 -05:00
MetaInputSettingsNative: allow unsetting click and scroll methods
Checking for supported methods isn't needed since libinput will just error out and do nothing itself if a requested method isn't supported and, in fact, this logic was preventing the enum values 0 from being set. https://bugzilla.gnome.org/show_bug.cgi?id=771744
This commit is contained in:
parent
6054b1cdbd
commit
1b4b361a92
@ -141,28 +141,18 @@ static gboolean
|
||||
device_set_scroll_method (struct libinput_device *libinput_device,
|
||||
enum libinput_config_scroll_method method)
|
||||
{
|
||||
enum libinput_config_scroll_method supported;
|
||||
|
||||
supported = libinput_device_config_scroll_get_methods (libinput_device);
|
||||
|
||||
if (method & supported)
|
||||
enum libinput_config_status status =
|
||||
libinput_device_config_scroll_set_method (libinput_device, method);
|
||||
|
||||
return (method & supported) != 0;
|
||||
return status == LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
device_set_click_method (struct libinput_device *libinput_device,
|
||||
enum libinput_config_click_method method)
|
||||
{
|
||||
enum libinput_config_click_method supported;
|
||||
|
||||
supported = libinput_device_config_click_get_methods (libinput_device);
|
||||
|
||||
if (method & supported)
|
||||
enum libinput_config_status status =
|
||||
libinput_device_config_click_set_method (libinput_device, method);
|
||||
|
||||
return (method & supported) != 0;
|
||||
return status == LIBINPUT_CONFIG_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user