summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-07-04 14:05:30 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-08-22 15:56:48 +1000
commit5669aa2d24dff9ab276e5f74a09f97ec77b90e75 (patch)
tree46a6ac05816f4773ecdd769707bc8f03a0563a16 /hw
parent5aa826cdd1f2e768bedf23d399703a5d0b6302be (diff)
xfree86: improve readability of synthesized device.
No functional changes. The options we assign are the ones from the Pointer/Keyboard device so we might as well use those readable names instead of dev[count-1]->options. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/common/xf86Config.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 04d0180a9..2dba088ad 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1208,16 +1208,16 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
if (foundPointer && confInput) {
foundPointer = configInput(&Pointer, confInput, from);
if (foundPointer) {
+ Pointer.options = xf86addNewOption(Pointer.options,
+ xnfstrdup("CorePointer"), "on");
+ Pointer.fd = -1;
count++;
devs = xnfrealloc(servlayoutp->inputs,
(count + 1) * sizeof(InputInfoPtr));
devs[count - 1] = xnfalloc(sizeof(InputInfoRec));
- Pointer.fd = -1;
- *devs[count - 1] = Pointer;
- devs[count - 1]->options =
- xf86addNewOption(devs[count -1]->options,
- xnfstrdup("CorePointer"), "on");
devs[count] = NULL;
+
+ *devs[count - 1] = Pointer;
servlayoutp->inputs = devs;
}
}
@@ -1254,15 +1254,16 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
confInput = &defPtr;
foundPointer = configInput(&Pointer, confInput, from);
if (foundPointer) {
+ Pointer.options = xf86addNewOption(NULL,
+ xnfstrdup("AlwaysCore"), "on");
+ Pointer.fd = -1;
count++;
devs = xnfrealloc(servlayoutp->inputs,
(count + 1) * sizeof(InputInfoPtr));
devs[count - 1] = xnfalloc(sizeof(InputInfoRec));
- Pointer.fd = -1;
- *devs[count - 1] = Pointer;
- devs[count - 1]->options =
- xf86addNewOption(NULL, xnfstrdup("AlwaysCore"), "on");
devs[count] = NULL;
+
+ *devs[count - 1] = Pointer;
servlayoutp->inputs = devs;
}
}
@@ -1351,16 +1352,16 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
if (foundKeyboard && confInput) {
foundKeyboard = configInput(&Keyboard, confInput, from);
if (foundKeyboard) {
+ Keyboard.options = xf86addNewOption(Keyboard.options,
+ xnfstrdup("CoreKeyboard"), "on");
+ Keyboard.fd = -1;
count++;
devs = xnfrealloc(servlayoutp->inputs,
(count + 1) * sizeof(InputInfoPtr));
devs[count - 1] = xnfalloc(sizeof(InputInfoRec));
- Keyboard.fd = -1;
- *devs[count - 1] = Keyboard;
- devs[count - 1]->options =
- xf86addNewOption(devs[count - 1]->options,
- xnfstrdup("CoreKeyboard"), "on");
devs[count] = NULL;
+
+ *devs[count - 1] = Keyboard;
servlayoutp->inputs = devs;
}
}