[PATCH 08/19] xfree86: remove extraOptions field from IDevRec.
Peter Hutterer
peter.hutterer at who-t.net
Sun Sep 5 19:52:44 PDT 2010
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
hw/xfree86/common/xf86Config.c | 35 ++++++-----------------------------
hw/xfree86/common/xf86Option.c | 7 -------
hw/xfree86/common/xf86str.h | 1 -
3 files changed, 6 insertions(+), 37 deletions(-)
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 76d820b..5d69c22 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1130,46 +1130,24 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
* remove the core attribute from the later ones.
*/
for (devs = servlayoutp->inputs; devs && *devs; devs++) {
- pointer opt1 = NULL, opt2 = NULL;
indp = *devs;
if (indp->commonOptions &&
xf86CheckBoolOption(indp->commonOptions, "CorePointer", FALSE)) {
- opt1 = indp->commonOptions;
- }
- if (indp->extraOptions &&
- xf86CheckBoolOption(indp->extraOptions, "CorePointer", FALSE)) {
- opt2 = indp->extraOptions;
- }
- if (opt1 || opt2) {
if (!corePointer) {
corePointer = indp;
} else {
- if (opt1)
- xf86ReplaceBoolOption(opt1, "CorePointer", FALSE);
- if (opt2)
- xf86ReplaceBoolOption(opt2, "CorePointer", FALSE);
+ xf86ReplaceBoolOption(indp->commonOptions, "CorePointer", FALSE);
xf86Msg(X_WARNING, "Duplicate core pointer devices. "
"Removing core pointer attribute from \"%s\"\n",
indp->identifier);
}
}
- opt1 = opt2 = NULL;
if (indp->commonOptions &&
xf86CheckBoolOption(indp->commonOptions, "CoreKeyboard", FALSE)) {
- opt1 = indp->commonOptions;
- }
- if (indp->extraOptions &&
- xf86CheckBoolOption(indp->extraOptions, "CoreKeyboard", FALSE)) {
- opt2 = indp->extraOptions;
- }
- if (opt1 || opt2) {
if (!coreKeyboard) {
coreKeyboard = indp;
} else {
- if (opt1)
- xf86ReplaceBoolOption(opt1, "CoreKeyboard", FALSE);
- if (opt2)
- xf86ReplaceBoolOption(opt2, "CoreKeyboard", FALSE);
+ xf86ReplaceBoolOption(indp->commonOptions, "CoreKeyboard", FALSE);
xf86Msg(X_WARNING, "Duplicate core keyboard devices. "
"Removing core keyboard attribute from \"%s\"\n",
indp->identifier);
@@ -1269,7 +1247,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
(count + 1) * sizeof(IDevPtr));
devs[count - 1] = xnfalloc(sizeof(IDevRec));
*devs[count - 1] = Pointer;
- devs[count - 1]->extraOptions =
+ devs[count - 1]->commonOptions =
xf86addNewOption(NULL, xnfstrdup("CorePointer"), NULL);
devs[count] = NULL;
servlayoutp->inputs = devs;
@@ -1313,7 +1291,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
(count + 1) * sizeof(IDevPtr));
devs[count - 1] = xnfalloc(sizeof(IDevRec));
*devs[count - 1] = Pointer;
- devs[count - 1]->extraOptions =
+ devs[count - 1]->commonOptions =
xf86addNewOption(NULL, xnfstrdup("AlwaysCore"), NULL);
devs[count] = NULL;
servlayoutp->inputs = devs;
@@ -1409,7 +1387,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
(count + 1) * sizeof(IDevPtr));
devs[count - 1] = xnfalloc(sizeof(IDevRec));
*devs[count - 1] = Keyboard;
- devs[count - 1]->extraOptions =
+ devs[count - 1]->commonOptions =
xf86addNewOption(NULL, xnfstrdup("CoreKeyboard"), NULL);
devs[count] = NULL;
servlayoutp->inputs = devs;
@@ -1506,7 +1484,7 @@ configInputDevices(XF86ConfLayoutPtr layout, serverLayoutPtr servlayoutp)
free(indp);
return FALSE;
}
- indp[count]->extraOptions = irp->iref_option_lst;
+ indp[count]->commonOptions = irp->iref_option_lst;
count++;
irp = (XF86ConfInputrefPtr)irp->list.next;
}
@@ -2328,7 +2306,6 @@ configInput(IDevPtr inputp, XF86ConfInputPtr conf_input, MessageType from)
inputp->identifier = conf_input->inp_identifier;
inputp->driver = conf_input->inp_driver;
inputp->commonOptions = conf_input->inp_option_lst;
- inputp->extraOptions = NULL;
inputp->attrs = NULL;
return TRUE;
diff --git a/hw/xfree86/common/xf86Option.c b/hw/xfree86/common/xf86Option.c
index aa6ea30..99b533b 100644
--- a/hw/xfree86/common/xf86Option.c
+++ b/hw/xfree86/common/xf86Option.c
@@ -150,13 +150,6 @@ xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts,
else
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) {
tmp = xf86optionListDup(extras);
if (pInfo->options)
diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h
index c9b261d..4659661 100644
--- a/hw/xfree86/common/xf86str.h
+++ b/hw/xfree86/common/xf86str.h
@@ -405,7 +405,6 @@ typedef struct {
char * identifier;
char * driver;
pointer commonOptions;
- pointer extraOptions;
InputAttributes *attrs;
} IDevRec, *IDevPtr;
--
1.7.2.2
More information about the xorg-devel
mailing list