Commit 7bf22a36 authored by Peter Hutterer's avatar Peter Hutterer

Use pInfo->options instead of conf-idev.

Because it doesn't really matter anyway, I think.
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarChase Douglas <chase.douglas@canonical.com>
parent f3f405db
......@@ -329,8 +329,8 @@ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
if (dev) {
/* Set the Device option. */
pInfo->conf_idev->commonOptions =
xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", dev);
pInfo->options =
xf86AddNewOption(pInfo->options, "Device", dev);
xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
pInfo->name, dev);
}
......@@ -369,8 +369,8 @@ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
SYSCALL(fd = open(*pdev, O_RDWR | O_NONBLOCK));
if (fd != -1) {
/* Set the Device option. */
pInfo->conf_idev->commonOptions =
xf86AddNewOption(pInfo->conf_idev->commonOptions,
pInfo->options =
xf86AddNewOption(pInfo->options,
"Device", *pdev);
xf86Msg(X_INFO, "%s: found Device \"%s\"\n",
pInfo->name, *pdev);
......
......@@ -183,8 +183,8 @@ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
return NULL;
close(fd);
pInfo->conf_idev->commonOptions =
xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", path);
pInfo->options =
xf86AddNewOption(pInfo->options, "Device", path);
xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n", pInfo->name,
path);
......
......@@ -80,8 +80,8 @@ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
if (*pdev) {
close(fd);
/* Set the Device option. */
pInfo->conf_idev->commonOptions =
xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", *pdev);
pInfo->options =
xf86AddNewOption(pInfo->options, "Device", *pdev);
xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
pInfo->name, *pdev);
}
......@@ -99,7 +99,7 @@ lnxMouseMagic(InputInfoPtr pInfo)
int i;
int proto = MOUSE_PROTO_UNKNOWN;
dev = xf86SetStrOption(pInfo->conf_idev->commonOptions, "Device", NULL);
dev = xf86SetStrOption(pInfo->options, "Device", NULL);
if (!dev) {
#ifdef DEBUG
ErrorF("xf86SetStrOption failed to return the device name\n");
......
......@@ -923,7 +923,11 @@ MousePreInit(InputDriverPtr drv, IDevPtr dev, int flags)
pMse->autoProbe = FALSE;
/* Collect the options, and process the common options. */
xf86CollectInputOptions(pInfo, pProto->defaults, NULL);
/* need some special handling here. xf86CollectInputOptions will reset
* pInfo->options if the second argument is not-null. To re-merge the
* previously set arguments, pass the original pInfo->options in.
*/
xf86CollectInputOptions(pInfo, pProto->defaults, pInfo->options);
xf86ProcessCommonOptions(pInfo, pInfo->options);
/* Check if the device can be opened. */
......
......@@ -259,8 +259,8 @@ vuidPreInit(InputInfoPtr pInfo, const char *protocol, int flags)
if (buttons == 0) {
SYSCALL(i = ioctl(pInfo->fd, MSIOBUTTONS, &buttons));
if (i == 0) {
pInfo->conf_idev->commonOptions =
xf86ReplaceIntOption(pInfo->conf_idev->commonOptions,
pInfo->options =
xf86ReplaceIntOption(pInfo->options,
"Buttons", buttons);
xf86Msg(X_INFO, "%s: Setting Buttons option to \"%d\"\n",
pInfo->name, buttons);
......@@ -676,16 +676,14 @@ solarisMouseAutoProbe(InputInfoPtr pInfo, const char **protocol,
/* Check to see if xorg.conf or HAL specified a device to use */
*device = xf86CheckStrOption(pInfo->options, "Device", NULL);
if (*device == NULL) {
*device = xf86CheckStrOption(pInfo->conf_idev->commonOptions,
"Device", NULL);
*device = xf86CheckStrOption(pInfo->options, "Device", NULL);
}
}
if (*device != NULL) {
strmod = xf86CheckStrOption(pInfo->options, "StreamsModule", NULL);
if (strmod == NULL) {
strmod = xf86CheckStrOption(pInfo->conf_idev->commonOptions,
"StreamsModule", NULL);
strmod = xf86CheckStrOption(pInfo->options, "StreamsModule", NULL);
}
if (strmod) {
/* if a device name is already known, and a StreamsModule is
......@@ -744,13 +742,13 @@ SetupAuto(InputInfoPtr pInfo, int *protoPara)
/* probe to find device/protocol to use */
if (solarisMouseAutoProbe(pInfo, &pproto, &pdev) != FALSE) {
/* Set the Device option. */
pInfo->conf_idev->commonOptions =
xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", pdev);
pInfo->options =
xf86AddNewOption(pInfo->options, "Device", pdev);
xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
pInfo->name, pdev);
}
} else if (pMse->protocolID == PROT_AUTO) {
pdev = xf86CheckStrOption(pInfo->conf_idev->commonOptions,
pdev = xf86CheckStrOption(pInfo->options,
"Device", NULL);
solarisMouseAutoProbe(pInfo, &pproto, &pdev);
}
......@@ -765,8 +763,8 @@ FindDevice(InputInfoPtr pInfo, const char *protocol, int flags)
if (solarisMouseAutoProbe(pInfo, &pproto, &pdev) != FALSE) {
/* Set the Device option. */
pInfo->conf_idev->commonOptions =
xf86AddNewOption(pInfo->conf_idev->commonOptions, "Device", pdev);
pInfo->options =
xf86AddNewOption(pInfo->options, "Device", pdev);
xf86Msg(X_INFO, "%s: Setting Device option to \"%s\"\n",
pInfo->name, pdev);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment