aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix')
-rwxr-xr-xxorg-server/dix/events.c3
-rw-r--r--xorg-server/dix/ptrveloc.c5
2 files changed, 4 insertions, 4 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index a77415377..b2b770d1c 100755
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -1444,7 +1444,8 @@ UpdateTouchesForGrab(DeviceIntPtr mouse)
listener->type = LISTENER_POINTER_GRAB;
else
listener->type = LISTENER_GRAB;
- FreeGrab(listener->grab);
+ if (listener->grab)
+ FreeGrab(listener->grab);
listener->grab = AllocGrab(grab);
}
}
diff --git a/xorg-server/dix/ptrveloc.c b/xorg-server/dix/ptrveloc.c
index 844e18538..6d349e089 100644
--- a/xorg-server/dix/ptrveloc.c
+++ b/xorg-server/dix/ptrveloc.c
@@ -254,11 +254,10 @@ AccelSetDecelProperty(DeviceIntPtr dev, Atom atom,
if (checkOnly) {
if (rc)
return rc;
- return (v >= 1.0f) ? Success : BadValue;
+ return (v > 0) ? Success : BadValue;
}
- if (v >= 1.0f)
- vel->const_acceleration = 1 / v;
+ vel->const_acceleration = 1 / v;
return Success;
}