From ae812bb79668e59cda1f851fb1fabe9db9ea705f Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 8 Sep 2009 13:53:26 +1000 Subject: [PATCH] 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 Signed-off-by: Peter Hutterer --- hw/xnest/Pointer.c | 4 ++++ 1 file changed, 4 insertions(+) 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);