COMPATIBILITY | 3 +++ alpscomm.c | 2 +- eventcomm.c | 16 +++++++++------- manpages/synaptics.5 | 20 ++++++++++++++++++++ ps2comm.c | 2 +- psmcomm.c | 2 +- synaptics.c | 3 ++- synaptics.h | 1 + synclient.c | 3 ++- synproto.h | 3 ++- 10 files changed, 42 insertions(+), 13 deletions(-)
New commits: commit 473912f50ffd2b26bd2f638f9d87f86cf60e2dd6 Author: Peter Osterlund <[EMAIL PROTECTED]> Date: Wed Apr 11 23:33:57 2007 +0200 Add a config option to prevent the driver from grabbing the event device for exclusive use. diff --git a/alpscomm.c b/alpscomm.c index e315c1c..822d173 100644 --- a/alpscomm.c +++ b/alpscomm.c @@ -72,7 +72,7 @@ ALPS_initialize(int fd) } static void -ALPSDeviceOnHook(LocalDevicePtr local) +ALPSDeviceOnHook(LocalDevicePtr local, SynapticsSHM *para) { } diff --git a/eventcomm.c b/eventcomm.c index 1b0f8bc..0afa189 100644 --- a/eventcomm.c +++ b/eventcomm.c @@ -41,14 +41,16 @@ ****************************************************************************/ static void -EventDeviceOnHook(LocalDevicePtr local) +EventDeviceOnHook(LocalDevicePtr local, SynapticsSHM *para) { - /* Try to grab the event device so that data don't leak to /dev/input/mice */ - int ret; - SYSCALL(ret = ioctl(local->fd, EVIOCGRAB, (pointer)1)); - if (ret < 0) { - xf86Msg(X_WARNING, "%s can't grab event device, errno=%d\n", - local->name, errno); + if (para->grab_event_device) { + /* Try to grab the event device so that data don't leak to /dev/input/mice */ + int ret; + SYSCALL(ret = ioctl(local->fd, EVIOCGRAB, (pointer)1)); + if (ret < 0) { + xf86Msg(X_WARNING, "%s can't grab event device, errno=%d\n", + local->name, errno); + } } } diff --git a/manpages/synaptics.5 b/manpages/synaptics.5 index ce44f98..4954402 100644 --- a/manpages/synaptics.5 +++ b/manpages/synaptics.5 @@ -324,6 +324,26 @@ Coasting threshold scrolling speed. .TP \fBSingleTapTimeout\fR (Integer) Timeout after a tap to recognize it as a single tap. +.TP +\fBGrabEventDevice\fR (Bool) +If GrabEventDevice is true, the driver will grab the event device for +exclusive use when using the linux 2.6 event protocol. +. +When using other protocols, this option has no effect. +. +Grabbing the event device means that no other user space or kernel +space program sees the touchpad events. +. +This is desirable if the X config file includes /dev/input/mice as an +input device, but is undesirable if you want to monitor the device +from user space. +. +When changing this parameter with the synclient program, the change +will not take effect until the synaptics driver is disabled and +reenabled. +. +This can be achieved by switching to a text console and then switching +back to X. . . .LP diff --git a/ps2comm.c b/ps2comm.c index 3defd56..fe1b929 100644 --- a/ps2comm.c +++ b/ps2comm.c @@ -433,7 +433,7 @@ ps2_print_ident(const struct SynapticsHwInfo *synhw) static void -PS2DeviceOnHook(LocalDevicePtr local) +PS2DeviceOnHook(LocalDevicePtr local, SynapticsSHM* para) { } diff --git a/psmcomm.c b/psmcomm.c index 257ec13..125ccd6 100644 --- a/psmcomm.c +++ b/psmcomm.c @@ -89,7 +89,7 @@ PSMQueryIsSynaptics(LocalDevicePtr local) } static void -PSMDeviceOnHook(LocalDevicePtr local) +PSMDeviceOnHook(LocalDevicePtr local, SynapticsSHM *para) { } diff --git a/synaptics.c b/synaptics.c index 4659b48..df71de8 100644 --- a/synaptics.c +++ b/synaptics.c @@ -430,6 +430,7 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags) pars->coasting_speed = synSetFloatOption(opts, "CoastingSpeed", 0.0); pars->press_motion_min_factor = synSetFloatOption(opts, "PressureMotionMinFactor", 1.0); pars->press_motion_max_factor = synSetFloatOption(opts, "PressureMotionMaxFactor", 1.0); + pars->grab_event_device = xf86SetBoolOption(opts, "GrabEventDevice", TRUE); /* Warn about (and fix) incorrectly configured TopEdge/BottomEdge parameters */ if (pars->top_edge > pars->bottom_edge) { @@ -555,7 +556,7 @@ DeviceOn(DeviceIntPtr dev) return !Success; } - priv->proto_ops->DeviceOnHook(local); + priv->proto_ops->DeviceOnHook(local, priv->synpara); priv->comm.buffer = XisbNew(local->fd, 64); if (!priv->comm.buffer) { diff --git a/synaptics.h b/synaptics.h index 1f9f8ba..0e56adb 100644 --- a/synaptics.h +++ b/synaptics.h @@ -100,6 +100,7 @@ typedef struct _SynapticsSHM int press_motion_max_z; /* finger pressure at which maximum pressure motion factor is applied */ double press_motion_min_factor; /* factor applied on speed when finger pressure is at minimum */ double press_motion_max_factor; /* factor applied on speed when finger pressure is at minimum */ + Bool grab_event_device; /* grab event device for exclusive use? */ } SynapticsSHM; /* diff --git a/synclient.c b/synclient.c index 6306d47..bf8b5d9 100644 --- a/synclient.c +++ b/synclient.c @@ -105,7 +105,8 @@ static struct Parameter params[] = { DEFINE_PAR("PressureMotionMinZ", press_motion_min_z, PT_INT, 1, 255), DEFINE_PAR("PressureMotionMaxZ", press_motion_max_z, PT_INT, 1, 255), DEFINE_PAR("PressureMotionMinFactor", press_motion_min_factor, PT_DOUBLE, 0, 10.0), - DEFINE_PAR("PressureMotionMaxFactor", press_motion_max_factor, PT_DOUBLE, 0, 10.0), + DEFINE_PAR("PressureMotionMaxFactor", press_motion_max_factor, PT_DOUBLE, 0, 10.0), + DEFINE_PAR("GrabEventDevice", grab_event_device, PT_BOOL, 0, 1), { 0, 0, 0, 0, 0 } }; diff --git a/synproto.h b/synproto.h index ecc4357..ebb44f3 100644 --- a/synproto.h +++ b/synproto.h @@ -72,11 +72,12 @@ enum SynapticsProtocol { SYN_PROTO_ALPS /* ALPS touchpad protocol */ }; +struct _SynapticsSHM; struct SynapticsHwInfo; struct CommData; struct SynapticsProtocolOperations { - void (*DeviceOnHook)(LocalDevicePtr local); + void (*DeviceOnHook)(LocalDevicePtr local, struct _SynapticsSHM *para); void (*DeviceOffHook)(LocalDevicePtr local); Bool (*QueryHardware)(LocalDevicePtr local, struct SynapticsHwInfo *synhw); Bool (*ReadHwState)(LocalDevicePtr local, struct SynapticsHwInfo *synhw, commit 1b258685118a39555616a7b3d08544162790850d Author: Peter Osterlund <[EMAIL PROTECTED]> Date: Sat Apr 7 09:23:00 2007 +0200 Added "Acer Aspire 9301AWSMi" to the compatibility list. (From MrPope <[EMAIL PROTECTED]>.) diff --git a/COMPATIBILITY b/COMPATIBILITY index f5c5aaa..bb3942b 100644 --- a/COMPATIBILITY +++ b/COMPATIBILITY @@ -11,6 +11,7 @@ Acer Aspire 3003WLMi Acer Aspire 3023 Acer Aspire 5670 Acer Aspire 5672 +Acer Aspire 9301AWSMi Acer Extensa 3001 WLMi Acer Ferrari 3000LMi Acer Ferrari 3200 commit 0316b51286aae93c19d14bc3e54741e1dfadf34d Author: Peter Osterlund <[EMAIL PROTECTED]> Date: Mon Mar 12 22:25:05 2007 +0100 Added "Toshiba Tecra A8" to the compatibility list. (From Pieter Lauwers <[EMAIL PROTECTED]>.) diff --git a/COMPATIBILITY b/COMPATIBILITY index 45fbade..f5c5aaa 100644 --- a/COMPATIBILITY +++ b/COMPATIBILITY @@ -297,5 +297,6 @@ Toshiba Satellite Pro 2100 (ALPS touchpad) Toshiba Satellite S3000-514 (ALPS touchpad) Toshiba Tecra A3 (ALPS touchpad) Toshiba Tecra A4 +Toshiba Tecra A8 Toshiba Tecra M2 (ALPS touchpad) Vobis Highscreen XI 14-C1200 (Same as Yakumo Q5M 1.2GHz) commit fe9f6d7915aac1860b6d00d74daf297e7ff3a283 Author: Peter Osterlund <[EMAIL PROTECTED]> Date: Mon Mar 12 22:24:19 2007 +0100 Added "Toshiba Satellite S3000-514" to the compatibility list. (From Stéphane <[EMAIL PROTECTED]>.) diff --git a/COMPATIBILITY b/COMPATIBILITY index 9c7b711..45fbade 100644 --- a/COMPATIBILITY +++ b/COMPATIBILITY @@ -294,6 +294,7 @@ Toshiba Satellite A75-S209 (ALPS touchpad) Toshiba Satellite M30 Toshiba Satellite P25-607 Toshiba Satellite Pro 2100 (ALPS touchpad) +Toshiba Satellite S3000-514 (ALPS touchpad) Toshiba Tecra A3 (ALPS touchpad) Toshiba Tecra A4 Toshiba Tecra M2 (ALPS touchpad) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]