diff options
author | Adam Jackson <ajax@redhat.com> | 2008-06-07 08:35:20 +0200 |
---|---|---|
committer | Christoph Brill <egore911@egore911.de> | 2008-07-11 18:01:53 +0200 |
commit | d18abb24d1519397a63fae6cf2c9c7e076005922 (patch) | |
tree | 9902b2af95ae2e53441dd0212680db49e0d5e463 | |
parent | 1d6b98a8d41815b2630e708e56ec265a83dde799 (diff) |
Add synaptics-0.14.6-alps.patch from Fedora
Fix the defaults on ALPS touchpads. Values stolen from rhpxl.
-rw-r--r-- | src/eventcomm.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c index 4e742bd..2f96e79 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -23,6 +23,7 @@ #include "config.h" #endif +#define SYNAPTICS_PRIVATE #include "eventcomm.h" #include <errno.h> #include <sys/types.h> @@ -103,12 +104,30 @@ event_query_is_touchpad(int fd) static Bool EventQueryHardware(LocalDevicePtr local, struct SynapticsHwInfo *synhw) { - if (event_query_is_touchpad(local->fd)) { - xf86Msg(X_PROBED, "%s touchpad found\n", local->name); - return TRUE; + if (!event_query_is_touchpad(local->fd)) + return FALSE; + + xf86Msg(X_PROBED, "%s touchpad found\n", local->name); + + /* awful */ + if (strstr(local->name, "ALPS")) { + SynapticsSHM *pars = ((SynapticsPrivate *)local->private)->synpara; + void *opts = local->options; + + pars->left_edge = xf86SetIntOption(opts, "LeftEdge", 120); + pars->right_edge = xf86SetIntOption(opts, "RightEdge", 830); + pars->top_edge = xf86SetIntOption(opts, "TopEdge", 120); + pars->bottom_edge = xf86SetIntOption(opts, "BottomEdge", 650); + pars->finger_low = xf86SetIntOption(opts, "FingerLow", 14); + pars->finger_high = xf86SetIntOption(opts, "FingerHigh", 15); + pars->tap_move = xf86SetIntOption(opts, "MaxTapMove", 110); + pars->scroll_dist_vert = xf86SetIntOption(opts, "VertScrollDelta", 20); + pars->scroll_dist_horiz = xf86SetIntOption(opts, "HorizScrollDelta", 20); + pars->min_speed = xf86SetRealOption(opts, "MinSpeed", 0.3); + pars->max_speed = xf86SetRealOption(opts, "MaxSpeed", 0.75); } - return FALSE; + return TRUE; } static Bool |