Diff attached.
-- Matthew Garrett | [EMAIL PROTECTED]
--- xserver-xorg-input-synaptics-0.14.3+seriouslythistime.orig/linux_input.h +++ xserver-xorg-input-synaptics-0.14.3+seriouslythistime/linux_input.h @@ -27,7 +27,7 @@ #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ #define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ #define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */ - +#define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ #define EV_SYN 0x00 #define EV_KEY 0x01 --- xserver-xorg-input-synaptics-0.14.3+seriouslythistime.orig/eventcomm.c +++ xserver-xorg-input-synaptics-0.14.3+seriouslythistime/eventcomm.c @@ -31,6 +31,8 @@ #define LONG(x) ((x) / LONG_BITS) #define TEST_BIT(bit, array) (array[LONG(bit)] & (1 << OFF(bit))) +extern int is_alps; + /***************************************************************************** * Function Definitions ****************************************************************************/ @@ -52,6 +54,17 @@ { } +static Bool +event_query_is_alps(int fd) +{ + char name[5]=""; + ioctl(fd, EVIOCGNAME(sizeof(name)),name); + name[4]='\0'; + if (strcmp(name, "Alps") == 0) + return TRUE; + return FALSE; +} + static Bool event_query_is_touchpad(int fd) { @@ -258,13 +271,17 @@ noent_cnt = 0; have_evdev = TRUE; is_touchpad = event_query_is_touchpad(fd); - SYSCALL(close(fd)); if (is_touchpad) { xf86Msg(X_PROBED, "%s auto-dev sets device to %s\n", local->name, fname); xf86ReplaceStrOption(local->options, "Device", fname); + if (event_query_is_alps(fd) == TRUE) { + is_alps = 1; + } + SYSCALL(close(fd)); return TRUE; } + SYSCALL(close(fd)); } ErrorF("%s no synaptics event device found (checked %d nodes)\n", local->name, i + 1); --- xserver-xorg-input-synaptics-0.14.3+seriouslythistime.orig/synaptics.c +++ xserver-xorg-input-synaptics-0.14.3+seriouslythistime/synaptics.c @@ -163,6 +163,7 @@ #endif /* XFree86LOADER */ +int is_alps=0; /***************************************************************************** * Function Definitions @@ -342,26 +343,49 @@ priv->shm_config = xf86SetBoolOption(local->options, "SHMConfig", FALSE); /* read the parameters */ + pars = &priv->synpara_default; - pars->left_edge = xf86SetIntOption(local->options, "LeftEdge", 1900); - pars->right_edge = xf86SetIntOption(local->options, "RightEdge", 5400); - pars->top_edge = xf86SetIntOption(local->options, "TopEdge", 1900); - pars->bottom_edge = xf86SetIntOption(local->options, "BottomEdge", 4000); - pars->finger_low = xf86SetIntOption(local->options, "FingerLow", 25); - pars->finger_high = xf86SetIntOption(local->options, "FingerHigh", 30); - pars->tap_time = xf86SetIntOption(local->options, "MaxTapTime", 180); - pars->tap_move = xf86SetIntOption(local->options, "MaxTapMove", 220); - pars->tap_time_2 = xf86SetIntOption(local->options, "MaxDoubleTapTime", 180); - pars->click_time = xf86SetIntOption(local->options, "ClickTime", 100); - pars->fast_taps = xf86SetIntOption(local->options, "FastTaps", FALSE); - pars->emulate_mid_button_time = xf86SetIntOption(local->options, + if (is_alps) { + pars->left_edge = xf86SetIntOption(local->options, "LeftEdge", 120); + pars->right_edge = xf86SetIntOption(local->options, "RightEdge", 830); + pars->top_edge = xf86SetIntOption(local->options, "TopEdge", 120); + pars->bottom_edge = xf86SetIntOption(local->options, "BottomEdge", 630); + pars->finger_low = xf86SetIntOption(local->options, "FingerLow", 14); + pars->finger_high = xf86SetIntOption(local->options, "FingerHigh", 15); + pars->tap_time = xf86SetIntOption(local->options, "MaxTapTime", 180); + pars->tap_move = xf86SetIntOption(local->options, "MaxTapMove", 110); + pars->tap_time_2 = xf86SetIntOption(local->options, "MaxDoubleTapTime", 180); + pars->click_time = xf86SetIntOption(local->options, "ClickTime", 100); + pars->fast_taps = xf86SetIntOption(local->options, "FastTaps", FALSE); + pars->emulate_mid_button_time = xf86SetIntOption(local->options, "EmulateMidButtonTime", 75); + pars->scroll_dist_vert = xf86SetIntOption(local->options, "VertScrollDelta", 20); + pars->scroll_dist_horiz = xf86SetIntOption(local->options, "HorizScrollDelta", 20); + pars->edge_motion_min_z = xf86SetIntOption(local->options, "EdgeMotionMinZ", 30); + pars->edge_motion_max_z = xf86SetIntOption(local->options, "EdgeMotionMaxZ", 160); + pars->edge_motion_min_speed = xf86SetIntOption(local->options, "EdgeMotionMinSpeed", 200); + pars->edge_motion_max_speed = xf86SetIntOption(local->options, "EdgeMotionMaxSpeed", 200); + } else { + pars->left_edge = xf86SetIntOption(local->options, "LeftEdge", 1900); + pars->right_edge = xf86SetIntOption(local->options, "RightEdge", 5400); + pars->top_edge = xf86SetIntOption(local->options, "TopEdge", 1900); + pars->bottom_edge = xf86SetIntOption(local->options, "BottomEdge", 4000); + pars->finger_low = xf86SetIntOption(local->options, "FingerLow", 25); + pars->finger_high = xf86SetIntOption(local->options, "FingerHigh", 30); + pars->tap_time = xf86SetIntOption(local->options, "MaxTapTime", 180); + pars->tap_move = xf86SetIntOption(local->options, "MaxTapMove", 220); + pars->tap_time_2 = xf86SetIntOption(local->options, "MaxDoubleTapTime", 180); + pars->click_time = xf86SetIntOption(local->options, "ClickTime", 100); + pars->fast_taps = xf86SetIntOption(local->options, "FastTaps", FALSE); + pars->emulate_mid_button_time = xf86SetIntOption(local->options, "EmulateMidButtonTime", 75); - pars->scroll_dist_vert = xf86SetIntOption(local->options, "VertScrollDelta", 100); - pars->scroll_dist_horiz = xf86SetIntOption(local->options, "HorizScrollDelta", 100); - pars->edge_motion_min_z = xf86SetIntOption(local->options, "EdgeMotionMinZ", 30); - pars->edge_motion_max_z = xf86SetIntOption(local->options, "EdgeMotionMaxZ", 160); - pars->edge_motion_min_speed = xf86SetIntOption(local->options, "EdgeMotionMinSpeed", 1); - pars->edge_motion_max_speed = xf86SetIntOption(local->options, "EdgeMotionMaxSpeed", 400); + pars->scroll_dist_vert = xf86SetIntOption(local->options, "VertScrollDelta", 100); + pars->scroll_dist_horiz = xf86SetIntOption(local->options, "HorizScrollDelta", 100); + pars->edge_motion_min_z = xf86SetIntOption(local->options, "EdgeMotionMinZ", 30); + pars->edge_motion_max_z = xf86SetIntOption(local->options, "EdgeMotionMaxZ", 160); + pars->edge_motion_min_speed = xf86SetIntOption(local->options, "EdgeMotionMinSpeed", 1); + pars->edge_motion_max_speed = xf86SetIntOption(local->options, "EdgeMotionMaxSpeed", 400); + } + pars->edge_motion_use_always = xf86SetBoolOption(local->options, "EdgeMotionUseAlways", FALSE); repeater = xf86SetStrOption(local->options, "Repeater", NULL); pars->updown_button_scrolling = xf86SetBoolOption(local->options, "UpDownScrolling", TRUE); @@ -387,14 +411,26 @@ pars->palm_min_z = xf86SetIntOption(local->options, "PalmMinZ", 200); str_par = xf86FindOptionValue(local->options, "MinSpeed"); - if ((!str_par) || (xf86sscanf(str_par, "%lf", &pars->min_speed) != 1)) - pars->min_speed=0.09; + if ((!str_par) || (xf86sscanf(str_par, "%lf", &pars->min_speed) != 1)) { + if (is_alps) + pars->min_speed=0.3; + else + pars->min_speed=0.09; + } str_par = xf86FindOptionValue(local->options, "MaxSpeed"); - if ((!str_par) || (xf86sscanf(str_par, "%lf", &pars->max_speed) != 1)) - pars->max_speed=0.18; + if ((!str_par) || (xf86sscanf(str_par, "%lf", &pars->max_speed) != 1)) { + if (is_alps) + pars->max_speed=0.75; + else + pars->max_speed=0.18; + } str_par = xf86FindOptionValue(local->options, "AccelFactor"); - if ((!str_par) || (xf86sscanf(str_par, "%lf", &pars->accl) != 1)) - pars->accl=0.0015; + if ((!str_par) || (xf86sscanf(str_par, "%lf", &pars->accl) != 1)) { + if (is_alps) + pars->accl=0.015; + else + pars->accl=0.0015; + } str_par = xf86FindOptionValue(local->options, "CircScrollDelta"); if ((!str_par) || (xf86sscanf(str_par, "%lf", &pars->scroll_dist_circ) != 1)) pars->scroll_dist_circ = 0.1;