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.hutte...@who-t.net>
---
 hw/xfree86/common/xf86Config.c |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 5a64b8a..74a7702 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1208,15 +1208,15 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool 
implicitLayout)
     if (foundPointer && confInput) {
        foundPointer = configInput(&Pointer, confInput, from);
         if (foundPointer) {
+           Pointer.options = xf86addNewOption(Pointer.options,
+                                              xnfstrdup("CorePointer"), "on");
            count++;
            devs = xnfrealloc(servlayoutp->inputs,
                              (count + 1) * sizeof(InputInfoPtr));
             devs[count - 1] = xnfalloc(sizeof(InputInfoRec));
-           *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;
        }
     }
@@ -1253,14 +1253,15 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool 
implicitLayout)
        confInput = &defPtr;
        foundPointer = configInput(&Pointer, confInput, from);
         if (foundPointer) {
+           Pointer.options = xf86addNewOption(NULL,
+                                              xnfstrdup("AlwaysCore"), "on");
            count++;
            devs = xnfrealloc(servlayoutp->inputs,
                              (count + 1) * sizeof(InputInfoPtr));
             devs[count - 1] = xnfalloc(sizeof(InputInfoRec));
-           *devs[count - 1] = Pointer;
-           devs[count - 1]->options =
-                               xf86addNewOption(NULL, xnfstrdup("AlwaysCore"), 
"on");
            devs[count] = NULL;
+
+           *devs[count - 1] = Pointer;
            servlayoutp->inputs = devs;
        }
     }
@@ -1349,15 +1350,15 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool 
implicitLayout)
     if (foundKeyboard && confInput) {
        foundKeyboard = configInput(&Keyboard, confInput, from);
         if (foundKeyboard) {
+           Keyboard.options = xf86addNewOption(Keyboard.options,
+                                               xnfstrdup("CoreKeyboard"), 
"on");
            count++;
            devs = xnfrealloc(servlayoutp->inputs,
                              (count + 1) * sizeof(InputInfoPtr));
             devs[count - 1] = xnfalloc(sizeof(InputInfoRec));
-           *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;
        }
     }
-- 
1.7.5.4

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to