diff options
author | Peter Osterlund <petero2@telia.com> | 2004-04-14 20:15:19 +0200 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2006-04-09 04:02:04 +0200 |
commit | b8e955b4ce399ba44e60bd13f9838974eee88513 (patch) | |
tree | 8b2754dcd401b29c37dab9aa35f2d9e1c7a5687a /ps2comm.c | |
parent | 599641dbbbd9cadf68ddf8cf8ffffbc1533d4012 (diff) |
Handle touchpads with a middle mouse button. Based on a 2.6
kernel patch from Dmitry Torokhov.
Diffstat (limited to 'ps2comm.c')
-rw-r--r-- | ps2comm.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -438,7 +438,9 @@ PrintIdent(const synapticshw_t *synhw) if (SYN_CAP_MULTI_BUTTON_NO(*synhw)) xf86Msg(X_PROBED, " -> %d multi buttons, i.e. besides standard buttons\n", (int)(SYN_CAP_MULTI_BUTTON_NO(*synhw))); - else if (SYN_CAP_FOUR_BUTTON(*synhw)) + if (SYN_CAP_MIDDLE_BUTTON(*synhw)) + xf86Msg(X_PROBED, " -> middle button\n"); + if (SYN_CAP_FOUR_BUTTON(*synhw)) xf86Msg(X_PROBED, " -> four buttons\n"); if (SYN_CAP_MULTIFINGER(*synhw)) xf86Msg(X_PROBED, " -> multifinger detection\n"); @@ -662,6 +664,9 @@ PS2ReadHwState(LocalDevicePtr local, synapticshw_t *synhw, hw->right = (buf[0] & 0x02) ? 1 : 0; if (SYN_CAP_EXTENDED(*synhw)) { + if (SYN_CAP_MIDDLE_BUTTON(*synhw)) { + hw->middle = ((buf[0] ^ buf[3]) & 0x01) ? 1 : 0; + } if (SYN_CAP_FOUR_BUTTON(*synhw)) { hw->up = ((buf[3] & 0x01)) ? 1 : 0; if (hw->left) |