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 <maass@informatik.tu-muenchen.de>.
This commit is contained in:
Peter Osterlund
2004-05-02 19:19:22 +02:00
parent b6cc622350
commit 214bbbd518
4 changed files with 9 additions and 3 deletions

1
README
View File

@@ -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.

View File

@@ -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;

View File

@@ -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 */

View File

@@ -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),