diff options
Diffstat (limited to 'driver/xf86-input-synaptics/src/properties.c')
-rw-r--r-- | driver/xf86-input-synaptics/src/properties.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/driver/xf86-input-synaptics/src/properties.c b/driver/xf86-input-synaptics/src/properties.c index 44ac3064a..3b3f1c549 100644 --- a/driver/xf86-input-synaptics/src/properties.c +++ b/driver/xf86-input-synaptics/src/properties.c @@ -519,6 +519,9 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, return BadMatch; dist = (INT32 *) prop->data; + if (dist[0] == 0 || dist[1] == 0) + return BadValue; + if (para->scroll_dist_vert != dist[0]) { para->scroll_dist_vert = dist[0]; #ifdef HAVE_SMOOTH_SCROLL @@ -715,6 +718,9 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, return BadMatch; circdist = *(float *) prop->data; + if (circdist == 0) + return BadValue; + para->scroll_dist_circ = circdist; } else if (property == prop_circscroll_trigger) { |