backends/x11: Add a synaptics check for two finger scroll availability

Commit "backends/x11: Support synaptics configuration" added support
for synaptics two finger scrolling but didn't add the code to check
that it is available resulting in the upper layer always assuming it
isn't.
This commit is contained in:
Rui Matos 2017-10-09 18:39:52 +02:00 committed by Ray Strode
parent 3680d75a76
commit 325d3ebb2a

View File

@ -625,6 +625,17 @@ meta_input_settings_x11_has_two_finger_scroll (MetaInputSettings *settings,
guchar *available = NULL;
gboolean has_two_finger = TRUE;
if (is_device_synaptics (device))
{
available = get_property (device, "Synaptics Capabilities",
XA_INTEGER, 8, 4);
if (!available || !available[3])
has_two_finger = FALSE;
meta_XFree (available);
return has_two_finger;
}
available = get_property (device, "libinput Scroll Methods Available",
XA_INTEGER, 8, SCROLL_METHOD_NUM_FIELDS);
if (!available || !available[SCROLL_METHOD_FIELD_2FG])