summaryrefslogtreecommitdiff
path: root/hw/xnest/Pointer.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-09-08 13:53:26 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-09-09 10:47:08 +1000
commitae812bb79668e59cda1f851fb1fabe9db9ea705f (patch)
tree24607ace9982ccd08a67b87b67e7a3317ec1dce7 /hw/xnest/Pointer.c
parent97e3f4316b1c917f93d324f05d3a4551c1d051a3 (diff)
Xnest: set the default pointer accel to the host's values (#10013)
The defaultPointerControl holds compile-time defaults for pointer acceleration. If an Xnest instance is started, it resets the hosts pointer accel values to these built-in defaults instead of using the host values. This patch queries the host for the values before initializing the device, thus leaving the host values untouched. X.Org Bug 10013 <http://bugs.freedesktop.org/show_bug.cgi?id=10013> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'hw/xnest/Pointer.c')
-rw-r--r--hw/xnest/Pointer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/xnest/Pointer.c b/hw/xnest/Pointer.c
index 4de467391..fdc6181e9 100644
--- a/hw/xnest/Pointer.c
+++ b/hw/xnest/Pointer.c
@@ -72,6 +72,10 @@ xnestPointerProc(DeviceIntPtr pDev, int onoff)
axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X);
axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y);
+ XGetPointerControl(xnestDisplay,
+ &defaultPointerControl.num,
+ &defaultPointerControl.den,
+ &defaultPointerControl.threshold);
InitPointerDeviceStruct(&pDev->public, map, nmap, btn_labels,
xnestChangePointerControl,
GetMotionHistorySize(), 2, axes_labels);