From 214bbbd518d6cc0ed06f628dea3b7b2a8dee3129 Mon Sep 17 00:00:00 2001 From: Peter Osterlund Date: Sun, 2 May 2004 19:19:22 +0200 Subject: Added a "GuestMouseOff" parameter to disable the pass through device. (It's not entirely uncommon that the pointing stick is broken and generates bogus pointer movements.) From Moritz Maass . --- README | 1 + synaptics.c | 7 +++++-- synaptics.h | 3 ++- synclient.c | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README b/README index bbc93d7..89c5beb 100644 --- a/README +++ b/README @@ -95,6 +95,7 @@ UpDownScrolling Bool If on, the up/down buttons generate button 4/5 events. EmulateMidButtonTime Int max time (in milliseconds) for middle button emulation. TouchpadOff Bool If on, the Touchpad is switched off (useful if an external mouse is connected) +GuestMouseOff Bool switch on/off guest mouse (often a stick) LockedDrags Bool If off, a tap and drag gesture ends when you release the finger. If on, the gesture is active until you tap a second time. diff --git a/synaptics.c b/synaptics.c index df62d1a..0f17fd9 100644 --- a/synaptics.c +++ b/synaptics.c @@ -319,6 +319,7 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags) repeater = xf86SetStrOption(local->options, "Repeater", NULL); pars->updown_button_scrolling = xf86SetBoolOption(local->options, "UpDownScrolling", TRUE); pars->touchpad_off = xf86SetBoolOption(local->options, "TouchpadOff", FALSE); + pars->guestmouse_off = xf86SetBoolOption(local->options, "GuestMouseOff", FALSE); pars->locked_drags = xf86SetBoolOption(local->options, "LockedDrags", FALSE); pars->tap_action[RT_TAP] = xf86SetIntOption(local->options, "RTCornerButton", 2); pars->tap_action[RB_TAP] = xf86SetIntOption(local->options, "RBCornerButton", 3); @@ -1037,8 +1038,10 @@ static long ComputeDeltas(SynapticsPrivate *priv, struct SynapticsHwState *hw, } /* Add guest device movements */ - dx += hw->guest_dx; - dy += hw->guest_dy; + if (!para->guestmouse_off) { + dx += hw->guest_dx; + dy += hw->guest_dy; + } *dxP = dx; *dyP = dy; diff --git a/synaptics.h b/synaptics.h index a796900..6dbab2a 100644 --- a/synaptics.h +++ b/synaptics.h @@ -61,7 +61,8 @@ typedef struct _SynapticsSHM Bool edge_motion_use_always; /* If false, egde motion is used only when dragging */ Bool updown_button_scrolling; /* Up/Down-Button scrolling or middle/double-click */ - Bool touchpad_off; /* Switches the Touchpad off*/ + Bool touchpad_off; /* Switches the touchpad off */ + Bool guestmouse_off; /* Switches the guest mouse off */ Bool locked_drags; /* Enable locked drags */ int tap_action[MAX_TAP]; /* Button to report on tap events */ Bool circular_scrolling; /* Enable circular scrolling */ diff --git a/synclient.c b/synclient.c index ae289b3..3eb4d8d 100644 --- a/synclient.c +++ b/synclient.c @@ -86,6 +86,7 @@ static struct Parameter params[] = { DEFINE_PAR("EdgeMotionUseAlways", edge_motion_use_always, PT_BOOL, 0, 1), DEFINE_PAR("UpDownScrolling", updown_button_scrolling, PT_BOOL, 0, 1), DEFINE_PAR("TouchpadOff", touchpad_off, PT_BOOL, 0, 1), + DEFINE_PAR("GuestMouseOff", guestmouse_off, PT_BOOL, 0, 1), DEFINE_PAR("LockedDrags", locked_drags, PT_BOOL, 0, 1), DEFINE_PAR("RTCornerButton", tap_action[RT_TAP], PT_INT, 0, 7), DEFINE_PAR("RBCornerButton", tap_action[RB_TAP], PT_INT, 0, 7), -- cgit v1.2.3