xfree86: remove extraOptions field from IDevRec.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
This commit is contained in:
parent
5ab8ca0807
commit
2199842ed5
@ -1130,46 +1130,24 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
|
|||||||
* remove the core attribute from the later ones.
|
* remove the core attribute from the later ones.
|
||||||
*/
|
*/
|
||||||
for (devs = servlayoutp->inputs; devs && *devs; devs++) {
|
for (devs = servlayoutp->inputs; devs && *devs; devs++) {
|
||||||
pointer opt1 = NULL, opt2 = NULL;
|
|
||||||
indp = *devs;
|
indp = *devs;
|
||||||
if (indp->commonOptions &&
|
if (indp->commonOptions &&
|
||||||
xf86CheckBoolOption(indp->commonOptions, "CorePointer", FALSE)) {
|
xf86CheckBoolOption(indp->commonOptions, "CorePointer", FALSE)) {
|
||||||
opt1 = indp->commonOptions;
|
|
||||||
}
|
|
||||||
if (indp->extraOptions &&
|
|
||||||
xf86CheckBoolOption(indp->extraOptions, "CorePointer", FALSE)) {
|
|
||||||
opt2 = indp->extraOptions;
|
|
||||||
}
|
|
||||||
if (opt1 || opt2) {
|
|
||||||
if (!corePointer) {
|
if (!corePointer) {
|
||||||
corePointer = indp;
|
corePointer = indp;
|
||||||
} else {
|
} else {
|
||||||
if (opt1)
|
xf86ReplaceBoolOption(indp->commonOptions, "CorePointer", FALSE);
|
||||||
xf86ReplaceBoolOption(opt1, "CorePointer", FALSE);
|
|
||||||
if (opt2)
|
|
||||||
xf86ReplaceBoolOption(opt2, "CorePointer", FALSE);
|
|
||||||
xf86Msg(X_WARNING, "Duplicate core pointer devices. "
|
xf86Msg(X_WARNING, "Duplicate core pointer devices. "
|
||||||
"Removing core pointer attribute from \"%s\"\n",
|
"Removing core pointer attribute from \"%s\"\n",
|
||||||
indp->identifier);
|
indp->identifier);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
opt1 = opt2 = NULL;
|
|
||||||
if (indp->commonOptions &&
|
if (indp->commonOptions &&
|
||||||
xf86CheckBoolOption(indp->commonOptions, "CoreKeyboard", FALSE)) {
|
xf86CheckBoolOption(indp->commonOptions, "CoreKeyboard", FALSE)) {
|
||||||
opt1 = indp->commonOptions;
|
|
||||||
}
|
|
||||||
if (indp->extraOptions &&
|
|
||||||
xf86CheckBoolOption(indp->extraOptions, "CoreKeyboard", FALSE)) {
|
|
||||||
opt2 = indp->extraOptions;
|
|
||||||
}
|
|
||||||
if (opt1 || opt2) {
|
|
||||||
if (!coreKeyboard) {
|
if (!coreKeyboard) {
|
||||||
coreKeyboard = indp;
|
coreKeyboard = indp;
|
||||||
} else {
|
} else {
|
||||||
if (opt1)
|
xf86ReplaceBoolOption(indp->commonOptions, "CoreKeyboard", FALSE);
|
||||||
xf86ReplaceBoolOption(opt1, "CoreKeyboard", FALSE);
|
|
||||||
if (opt2)
|
|
||||||
xf86ReplaceBoolOption(opt2, "CoreKeyboard", FALSE);
|
|
||||||
xf86Msg(X_WARNING, "Duplicate core keyboard devices. "
|
xf86Msg(X_WARNING, "Duplicate core keyboard devices. "
|
||||||
"Removing core keyboard attribute from \"%s\"\n",
|
"Removing core keyboard attribute from \"%s\"\n",
|
||||||
indp->identifier);
|
indp->identifier);
|
||||||
@ -1269,7 +1247,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
|
|||||||
(count + 1) * sizeof(IDevPtr));
|
(count + 1) * sizeof(IDevPtr));
|
||||||
devs[count - 1] = xnfalloc(sizeof(IDevRec));
|
devs[count - 1] = xnfalloc(sizeof(IDevRec));
|
||||||
*devs[count - 1] = Pointer;
|
*devs[count - 1] = Pointer;
|
||||||
devs[count - 1]->extraOptions =
|
devs[count - 1]->commonOptions =
|
||||||
xf86addNewOption(NULL, xnfstrdup("CorePointer"), NULL);
|
xf86addNewOption(NULL, xnfstrdup("CorePointer"), NULL);
|
||||||
devs[count] = NULL;
|
devs[count] = NULL;
|
||||||
servlayoutp->inputs = devs;
|
servlayoutp->inputs = devs;
|
||||||
@ -1313,7 +1291,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
|
|||||||
(count + 1) * sizeof(IDevPtr));
|
(count + 1) * sizeof(IDevPtr));
|
||||||
devs[count - 1] = xnfalloc(sizeof(IDevRec));
|
devs[count - 1] = xnfalloc(sizeof(IDevRec));
|
||||||
*devs[count - 1] = Pointer;
|
*devs[count - 1] = Pointer;
|
||||||
devs[count - 1]->extraOptions =
|
devs[count - 1]->commonOptions =
|
||||||
xf86addNewOption(NULL, xnfstrdup("AlwaysCore"), NULL);
|
xf86addNewOption(NULL, xnfstrdup("AlwaysCore"), NULL);
|
||||||
devs[count] = NULL;
|
devs[count] = NULL;
|
||||||
servlayoutp->inputs = devs;
|
servlayoutp->inputs = devs;
|
||||||
@ -1409,7 +1387,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
|
|||||||
(count + 1) * sizeof(IDevPtr));
|
(count + 1) * sizeof(IDevPtr));
|
||||||
devs[count - 1] = xnfalloc(sizeof(IDevRec));
|
devs[count - 1] = xnfalloc(sizeof(IDevRec));
|
||||||
*devs[count - 1] = Keyboard;
|
*devs[count - 1] = Keyboard;
|
||||||
devs[count - 1]->extraOptions =
|
devs[count - 1]->commonOptions =
|
||||||
xf86addNewOption(NULL, xnfstrdup("CoreKeyboard"), NULL);
|
xf86addNewOption(NULL, xnfstrdup("CoreKeyboard"), NULL);
|
||||||
devs[count] = NULL;
|
devs[count] = NULL;
|
||||||
servlayoutp->inputs = devs;
|
servlayoutp->inputs = devs;
|
||||||
@ -1506,7 +1484,7 @@ configInputDevices(XF86ConfLayoutPtr layout, serverLayoutPtr servlayoutp)
|
|||||||
free(indp);
|
free(indp);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
indp[count]->extraOptions = irp->iref_option_lst;
|
indp[count]->commonOptions = irp->iref_option_lst;
|
||||||
count++;
|
count++;
|
||||||
irp = (XF86ConfInputrefPtr)irp->list.next;
|
irp = (XF86ConfInputrefPtr)irp->list.next;
|
||||||
}
|
}
|
||||||
@ -2328,7 +2306,6 @@ configInput(IDevPtr inputp, XF86ConfInputPtr conf_input, MessageType from)
|
|||||||
inputp->identifier = conf_input->inp_identifier;
|
inputp->identifier = conf_input->inp_identifier;
|
||||||
inputp->driver = conf_input->inp_driver;
|
inputp->driver = conf_input->inp_driver;
|
||||||
inputp->commonOptions = conf_input->inp_option_lst;
|
inputp->commonOptions = conf_input->inp_option_lst;
|
||||||
inputp->extraOptions = NULL;
|
|
||||||
inputp->attrs = NULL;
|
inputp->attrs = NULL;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -150,13 +150,6 @@ xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts,
|
|||||||
else
|
else
|
||||||
pInfo->options = tmp;
|
pInfo->options = tmp;
|
||||||
}
|
}
|
||||||
if (pInfo->conf_idev && pInfo->conf_idev->extraOptions) {
|
|
||||||
tmp = xf86optionListDup(pInfo->conf_idev->extraOptions);
|
|
||||||
if (pInfo->options)
|
|
||||||
pInfo->options = xf86optionListMerge(pInfo->options, tmp);
|
|
||||||
else
|
|
||||||
pInfo->options = tmp;
|
|
||||||
}
|
|
||||||
if (extras) {
|
if (extras) {
|
||||||
tmp = xf86optionListDup(extras);
|
tmp = xf86optionListDup(extras);
|
||||||
if (pInfo->options)
|
if (pInfo->options)
|
||||||
|
@ -405,7 +405,6 @@ typedef struct {
|
|||||||
char * identifier;
|
char * identifier;
|
||||||
char * driver;
|
char * driver;
|
||||||
pointer commonOptions;
|
pointer commonOptions;
|
||||||
pointer extraOptions;
|
|
||||||
InputAttributes *attrs;
|
InputAttributes *attrs;
|
||||||
} IDevRec, *IDevPtr;
|
} IDevRec, *IDevPtr;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user