diff options
Diffstat (limited to 'src/properties.c')
-rw-r--r-- | src/properties.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/properties.c b/src/properties.c index 44ac306..3b3f1c5 100644 --- a/src/properties.c +++ b/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) { |