diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/alpscomm.c | 22 | ||||
-rw-r--r-- | src/eventcomm.c | 17 | ||||
-rw-r--r-- | src/properties.c | 8 | ||||
-rw-r--r-- | src/ps2comm.c | 115 | ||||
-rw-r--r-- | src/psmcomm.c | 7 | ||||
-rw-r--r-- | src/synaptics.c | 19 | ||||
-rw-r--r-- | src/synapticsstr.h | 1 | ||||
-rw-r--r-- | src/synproto.h | 6 |
8 files changed, 0 insertions, 195 deletions
diff --git a/src/alpscomm.c b/src/alpscomm.c index c58c405..a5a4344 100644 --- a/src/alpscomm.c +++ b/src/alpscomm.c @@ -155,33 +155,11 @@ ALPS_process_packet(unsigned char *packet, struct SynapticsHwState *hw) int left = 0, right = 0, middle = 0; int i; - /* Handle guest packets */ - hw->guest_dx = hw->guest_dy = 0; - if ((packet[0] & 0xc8) == 0x08) { /* 3-byte PS/2 packet */ - x = packet[1]; - if (packet[0] & 0x10) - x = x - 256; - y = packet[2]; - if (packet[0] & 0x20) - y = y - 256; - hw->guest_dx = x; - hw->guest_dy = -y; - hw->guest_left = (packet[0] & 0x01) ? TRUE : FALSE; - hw->guest_right = (packet[0] & 0x02) ? TRUE : FALSE; - return; - } - x = (packet[1] & 0x7f) | ((packet[2] & 0x78) << (7-3)); y = (packet[4] & 0x7f) | ((packet[3] & 0x70) << (7-4)); z = packet[5]; if (z == 127) { /* DualPoint stick is relative, not absolute */ - if (x > 383) - x = x - 768; - if (y > 255) - y = y - 512; - hw->guest_dx = x; - hw->guest_dy = -y; hw->left = packet[3] & 1; hw->right = (packet[3] >> 1) & 1; return; diff --git a/src/eventcomm.c b/src/eventcomm.c index 6c85cc4..60f737c 100644 --- a/src/eventcomm.c +++ b/src/eventcomm.c @@ -324,7 +324,6 @@ EventReadHwState(LocalDevicePtr local, else hw->numFingers = 0; *hwRet = *hw; - hw->guest_dx = hw->guest_dy = 0; return TRUE; } case EV_KEY: @@ -378,12 +377,6 @@ EventReadHwState(LocalDevicePtr local, case BTN_TOOL_TRIPLETAP: comm->threeFingers = v; break; - case BTN_A: - hw->guest_left = v; - break; - case BTN_B: - hw->guest_right = v; - break; case BTN_TOUCH: if (!priv->has_pressure) hw->z = v ? para->finger_high + 1 : 0; @@ -406,16 +399,6 @@ EventReadHwState(LocalDevicePtr local, break; } break; - case EV_REL: - switch (ev.code) { - case REL_X: - hw->guest_dx = ev.value; - break; - case REL_Y: - hw->guest_dy = ev.value; - break; - } - break; } } return FALSE; diff --git a/src/properties.c b/src/properties.c index a5d37b3..e5eaf95 100644 --- a/src/properties.c +++ b/src/properties.c @@ -64,7 +64,6 @@ Atom prop_buttonscroll = 0; Atom prop_buttonscroll_repeat = 0; Atom prop_buttonscroll_time = 0; Atom prop_off = 0; -Atom prop_guestmouse = 0; Atom prop_lockdrags = 0; Atom prop_lockdrags_time = 0; Atom prop_tapaction = 0; @@ -220,7 +219,6 @@ InitDeviceProperties(LocalDevicePtr local) } prop_off = InitAtom(local->dev, SYNAPTICS_PROP_OFF, 8, 1, ¶->touchpad_off); - prop_guestmouse = InitAtom(local->dev, SYNAPTICS_PROP_GUESTMOUSE, 8, 1, ¶->guestmouse_off); prop_lockdrags = InitAtom(local->dev, SYNAPTICS_PROP_LOCKED_DRAGS, 8, 1, ¶->locked_drags); prop_lockdrags_time = InitAtom(local->dev, SYNAPTICS_PROP_LOCKED_DRAGS_TIMEOUT, 32, 1, ¶->locked_drag_time); @@ -502,12 +500,6 @@ SetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, return BadValue; para->touchpad_off = off; - } else if (property == prop_guestmouse) - { - if (prop->size != 1 || prop->format != 8 || prop->type != XA_INTEGER) - return BadMatch; - - para->guestmouse_off = *(BOOL*)prop->data; } else if (property == prop_gestures) { BOOL *gestures; diff --git a/src/ps2comm.c b/src/ps2comm.c index b9420bf..4b844c6 100644 --- a/src/ps2comm.c +++ b/src/ps2comm.c @@ -87,7 +87,6 @@ struct SynapticsHwInfo { unsigned int capabilities; /* Capabilities */ unsigned int ext_cap; /* Extended Capabilities */ unsigned int identity; /* Identification */ - Bool hasGuest; /* Has a guest mouse */ }; /***************************************************************************** @@ -174,61 +173,6 @@ ps2_send_cmd(int fd, byte c) } /***************************************************************************** - * Synaptics passthrough functions - ****************************************************************************/ - -static Bool -ps2_getbyte_passthrough(int fd, byte *response) -{ - byte ack; - int timeout_count; -#define MAX_RETRY_COUNT 30 - - /* Getting a response back through the passthrough could take some time. - * Spin a little for the first byte */ - for (timeout_count = 0; - !ps2_getbyte(fd, &ack) && (timeout_count <= MAX_RETRY_COUNT); - timeout_count++) - ; - /* Do some sanity checking */ - if ((ack & 0xfc) != 0x84) { - PS2DBG(ErrorF("ps2_getbyte_passthrough: expected 0x84 and got: %02x\n", - ack & 0xfc)); - return FALSE; - } - - ps2_getbyte(fd, response); - ps2_getbyte(fd, &ack); - ps2_getbyte(fd, &ack); - if ((ack & 0xcc) != 0xc4) { - PS2DBG(ErrorF("ps2_getbyte_passthrough: expected 0xc4 and got: %02x\n", - ack & 0xcc)); - return FALSE; - } - ps2_getbyte(fd, &ack); - ps2_getbyte(fd, &ack); - - return TRUE; -} - -static Bool -ps2_putbyte_passthrough(int fd, byte c) -{ - byte ack; - - ps2_special_cmd(fd, c); - ps2_putbyte(fd, 0xF3); - ps2_putbyte(fd, 0x28); - - ps2_getbyte_passthrough(fd, &ack); - if (ack != PS2_ACK) { - PS2DBG(ErrorF("ps2_putbyte_passthrough: wrong acknowledge 0x%02x\n", ack)); - return FALSE; - } - return TRUE; -} - -/***************************************************************************** * Synaptics communications functions ****************************************************************************/ @@ -272,30 +216,6 @@ ps2_synaptics_reset(int fd) return FALSE; } -static Bool -ps2_synaptics_reset_passthrough(int fd) -{ - byte ack; - - /* send reset */ - ps2_putbyte_passthrough(fd, 0xff); - ps2_getbyte_passthrough(fd, &ack); - if (ack != 0xaa) { - PS2DBG(ErrorF("ps2_synaptics_reset_passthrough: ack was %02x not 0xaa\n", ack)); - return FALSE; - } - ps2_getbyte_passthrough(fd, &ack); - if (ack != 0x00) { - PS2DBG(ErrorF("ps2_synaptics_reset_passthrough: ack was %02x not 0x00\n", ack)); - return FALSE; - } - - /* set defaults, turn on streaming, and enable the mouse */ - return (ps2_putbyte_passthrough(fd, 0xf6) && - ps2_putbyte_passthrough(fd, 0xea) && - ps2_putbyte_passthrough(fd, 0xf4)); -} - /* * Read the model-id bytes from the touchpad * see also SYN_MODEL_* macros @@ -500,22 +420,6 @@ PS2QueryHardware(LocalDevicePtr local) if (!ps2_synaptics_set_mode(local->fd, mode)) return FALSE; - /* Check to see if the host mouse supports a guest */ - synhw->hasGuest = FALSE; - if (SYN_CAP_PASSTHROUGH(synhw)) { - synhw->hasGuest = TRUE; - - /* Enable the guest mouse. Set it to relative mode, three byte - * packets */ - - /* Disable the host to talk to the guest */ - ps2_synaptics_disable_device(local->fd); - /* Reset it, set defaults, streaming and enable it */ - if (!ps2_synaptics_reset_passthrough(local->fd)) { - synhw->hasGuest = FALSE; - } - } - ps2_synaptics_enable_device(local->fd); ps2_print_ident(synhw); @@ -643,25 +547,6 @@ PS2ReadHwState(LocalDevicePtr local, if (!ps2_synaptics_get_packet(local, synhw, proto_ops, comm)) return FALSE; - /* Handle guest packets */ - hw->guest_dx = hw->guest_dy = 0; - if (newabs && synhw->hasGuest) { - w = (((buf[0] & 0x30) >> 2) | - ((buf[0] & 0x04) >> 1) | - ((buf[3] & 0x04) >> 2)); - if (w == 3) { /* If w is 3, this is a guest packet */ - if (buf[4] != 0) - hw->guest_dx = buf[4] - ((buf[1] & 0x10) ? 256 : 0); - if (buf[5] != 0) - hw->guest_dy = -(buf[5] - ((buf[1] & 0x20) ? 256 : 0)); - hw->guest_left = (buf[1] & 0x01) ? TRUE : FALSE; - hw->guest_mid = (buf[1] & 0x04) ? TRUE : FALSE; - hw->guest_right = (buf[1] & 0x02) ? TRUE : FALSE; - *hwRet = *hw; - return TRUE; - } - } - /* Handle normal packets */ hw->x = hw->y = hw->z = hw->numFingers = hw->fingerWidth = 0; hw->left = hw->right = hw->up = hw->down = hw->middle = FALSE; diff --git a/src/psmcomm.c b/src/psmcomm.c index 8a96101..db2bbbc 100644 --- a/src/psmcomm.c +++ b/src/psmcomm.c @@ -57,7 +57,6 @@ struct SynapticsHwInfo { unsigned int capabilities; /* Capabilities */ unsigned int ext_cap; /* Extended Capabilities */ unsigned int identity; /* Identification */ - Bool hasGuest; /* Has a guest mouse */ }; /* @@ -158,12 +157,6 @@ PSMQueryHardware(LocalDevicePtr local) convert_hw_info(&psm_ident, synhw); - /* Check to see if the host mouse supports a guest */ - synhw->hasGuest = FALSE; - if (psm_ident.capPassthrough) { - synhw->hasGuest = TRUE; - } - ps2_print_ident(synhw); return TRUE; diff --git a/src/synaptics.c b/src/synaptics.c index 0c9847a..ba7b4f4 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -517,7 +517,6 @@ static void set_default_parameters(LocalDevicePtr local) } pars->scroll_button_repeat = xf86SetIntOption(opts,"ScrollButtonRepeat", 100); pars->touchpad_off = xf86SetIntOption(opts, "TouchpadOff", 0); - pars->guestmouse_off = xf86SetBoolOption(opts, "GuestMouseOff", FALSE); pars->locked_drags = xf86SetBoolOption(opts, "LockedDrags", FALSE); pars->locked_drag_time = xf86SetIntOption(opts, "LockedDragTimeout", 5000); pars->tap_action[RT_TAP] = xf86SetIntOption(opts, "RTCornerButton", 0); @@ -1159,7 +1158,6 @@ timerFunc(OsTimerPtr timer, CARD32 now, pointer arg) sigstate = xf86BlockSIGIO(); hw = priv->hwState; - hw.guest_dx = hw.guest_dy = 0; hw.millis = now; delay = HandleState(local, &hw); @@ -1766,12 +1764,6 @@ ComputeDeltas(SynapticsPrivate *priv, const struct SynapticsHwState *hw, priv->count_packet_finger = 0; } - /* Add guest device movements */ - if (!para->guestmouse_off) { - dx += hw->guest_dx; - dy += hw->guest_dy; - } - *dxP = dx; *dyP = dy; @@ -2135,11 +2127,6 @@ update_shm(const LocalDevicePtr local, const struct SynapticsHwState *hw) for (i = 0; i < 8; i++) shm->multi[i] = hw->multi[i]; shm->middle = hw->middle; - shm->guest_left = hw->guest_left; - shm->guest_mid = hw->guest_mid; - shm->guest_right = hw->guest_right; - shm->guest_dx = hw->guest_dx; - shm->guest_dy = hw->guest_dy; } /* Adjust the hardware state according to the extra buttons (if the touchpad @@ -2191,12 +2178,6 @@ update_hw_button_state(const LocalDevicePtr local, struct SynapticsHwState *hw, hw->up |= hw->multi[0]; hw->down |= hw->multi[1]; - if (!para->guestmouse_off) { - hw->left |= hw->guest_left; - hw->middle |= hw->guest_mid; - hw->right |= hw->guest_right; - } - /* 3rd button emulation */ hw->middle |= HandleMidButtonEmulation(priv, hw, delay); diff --git a/src/synapticsstr.h b/src/synapticsstr.h index a63df23..75c3ec8 100644 --- a/src/synapticsstr.h +++ b/src/synapticsstr.h @@ -138,7 +138,6 @@ typedef struct _SynapticsParameters * 1 : Off * 2 : Only tapping and scrolling off */ - Bool guestmouse_off; /* Switches the guest mouse off */ Bool locked_drags; /* Enable locked drags */ int locked_drag_time; /* timeout for locked drags */ int tap_action[MAX_TAP]; /* Button to report on tap events */ diff --git a/src/synproto.h b/src/synproto.h index f7be819..c851271 100644 --- a/src/synproto.h +++ b/src/synproto.h @@ -50,12 +50,6 @@ struct SynapticsHwState { Bool multi[8]; Bool middle; /* Some ALPS touchpads have a middle button */ - - Bool guest_left; /* guest device */ - Bool guest_mid; - Bool guest_right; - int guest_dx; - int guest_dy; }; struct CommData { |