mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-11 07:30:19 +01:00
xfree86: Fix priority ordering for ignoring input classes
Commit8736d112afchanged 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> (cherry picked from commitadbbc66108) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
9157b0ad4d
commit
d0e9583fa8
1 changed files with 12 additions and 7 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue