summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86Xinput.c
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2010-02-16 08:11:41 -0800
committerDan Nicholson <dbn.lists@gmail.com>2010-04-11 07:29:23 -0700
commitadbbc661080ba4efdb764c154d40c4d2fe718e16 (patch)
treec30c22f42a6adcc7ab85f486e734ca41b58809a6 /hw/xfree86/common/xf86Xinput.c
parentd7c98c1c81ae272f66edb05fde20f4c616604add (diff)
xfree86: Fix priority ordering for ignoring input classes
Commit 8736d112afb0dd61dfdaadd6378eafd200b2ef5f changed the priority ordering of the InputClass option merging to be "last match wins". This fixes the handling of Option "Ignore" to follow that logic. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xfree86/common/xf86Xinput.c')
-rw-r--r--hw/xfree86/common/xf86Xinput.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
index 822922717..7723ba683 100644
--- a/hw/xfree86/common/xf86Xinput.c
+++ b/hw/xfree86/common/xf86Xinput.c
@@ -625,25 +625,30 @@ MergeInputClasses(IDevPtr idev, InputAttributes *attrs)
return Success;
}
+/*
+ * Iterate the list of classes and look for Option "Ignore". Return the
+ * value of the last matching class and holler when returning TRUE.
+ */
static Bool
IgnoreInputClass(IDevPtr idev, InputAttributes *attrs)
{
XF86ConfInputClassPtr cl;
- Bool ignore;
+ Bool ignore = FALSE;
+ const char *ignore_class;
for (cl = xf86configptr->conf_inputclass_lst; cl; cl = cl->list.next) {
if (!InputClassMatches(cl, attrs))
continue;
if (xf86findOption(cl->option_lst, "Ignore")) {
ignore = xf86CheckBoolOption(cl->option_lst, "Ignore", FALSE);
- if (ignore)
- xf86Msg(X_CONFIG,
- "%s: Ignoring device from InputClass \"%s\"\n",
- idev->identifier, cl->identifier);
- return ignore;
+ ignore_class = cl->identifier;
}
}
- return FALSE;
+
+ if (ignore)
+ xf86Msg(X_CONFIG, "%s: Ignoring device from InputClass \"%s\"\n",
+ idev->identifier, ignore_class);
+ return ignore;
}
/**