summaryrefslogtreecommitdiff
path: root/synaptics.c
diff options
context:
space:
mode:
authorPeter Osterlund <petero2@telia.com>2004-07-30 16:24:12 +0200
committerPeter Osterlund <petero2@telia.com>2006-04-09 04:02:43 +0200
commitd0d22a605561136915197bce0f94353bc28ee734 (patch)
treedf94c2da72be80040b85e0cbfebf81115e3b908c /synaptics.c
parent28c85320798c5625907d7809ee9af15055cca8c7 (diff)
The GuestMouseOff parameter now also disables the guest
buttons.
Diffstat (limited to 'synaptics.c')
-rw-r--r--synaptics.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/synaptics.c b/synaptics.c
index ba15065..4acfb31 100644
--- a/synaptics.c
+++ b/synaptics.c
@@ -1369,14 +1369,18 @@ HandleState(LocalDevicePtr local, struct SynapticsHwState *hw)
timeleft = ComputeDeltas(priv, hw, edge, &dx, &dy);
delay = MIN(delay, timeleft);
-
- buttons = (((hw->left || hw->guest_left) ? 0x01 : 0) |
- ((hw->middle || hw->guest_mid) ? 0x02 : 0) |
- ((hw->right || hw->guest_right) ? 0x04 : 0) |
- (hw->up ? 0x08 : 0) |
- (hw->down ? 0x10 : 0) |
- (hw->multi[2] ? 0x20 : 0) |
- (hw->multi[3] ? 0x40 : 0));
+ if (!para->guestmouse_off) {
+ hw->left |= hw->guest_left;
+ hw->middle |= hw->guest_mid;
+ hw->right |= hw->guest_right;
+ }
+ buttons = ((hw->left ? 0x01 : 0) |
+ (hw->middle ? 0x02 : 0) |
+ (hw->right ? 0x04 : 0) |
+ (hw->up ? 0x08 : 0) |
+ (hw->down ? 0x10 : 0) |
+ (hw->multi[2] ? 0x20 : 0) |
+ (hw->multi[3] ? 0x40 : 0));
if (priv->tap_button > 0) {
int tap_mask = 1 << (priv->tap_button - 1);