Revert "Attempt to add the 'mouse' driver in more situations."

This reverts commit 43d9edd31e.

This commit was introduced in the 1.2 cycle when hotplugging was less than
ideal (i.e. it didn't exist). From the commit message:

    Always add a mouse driver instance configured to send core events, unless
    a core pointer already exists using either the mouse or void drivers.  This
    handles the laptop case where the config file only specifies, say,
    synaptics, which causes the touchpad to work but not the pointing stick.
    We don't double-instantiate the mouse driver to avoid the mouse moving twice
    as fast, and we skip this logic when the user asked for a void core pointer
    since that probably means they want to run with no pointer at all.

To get this case above, a user would need to disable hotplugging _and_ have a
xorg.conf that only references one device. This is possible, but not a use-case
we should worry about too much now.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Peter Hutterer 2011-07-08 16:13:45 +10:00
parent 159b03e137
commit 1357cd7251

View File

@ -1134,7 +1134,6 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
XF86ConfInputPtr confInput;
XF86ConfInputRec defPtr, defKbd;
MessageType from = X_DEFAULT;
int found = 0;
const char *mousedrivers[] = { "mouse", "synaptics", "evdev", "vmmouse",
"void", NULL };
@ -1251,40 +1250,6 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
return FALSE;
}
/*
* always synthesize a 'mouse' section configured to send core
* events, unless a 'void' section is found, in which case the user
* probably wants to run footless.
*
* If you're using an evdev keyboard and expect a default mouse
* section ... deal.
*/
for (devs = servlayoutp->inputs; devs && *devs; devs++) {
const char **driver = mousedrivers;
while(*driver) {
if (!strcmp((*devs)->driver, *driver)) {
found = 1;
break;
}
driver++;
}
}
if (!found && xf86Info.forceInputDevices) {
xf86Msg(X_INFO, "No default mouse found, adding one\n");
memset(&defPtr, 0, sizeof(defPtr));
defPtr.inp_identifier = strdup("<default pointer>");
defPtr.inp_driver = strdup("mouse");
confInput = &defPtr;
Pointer = xf86AllocateInput();
if (Pointer)
foundPointer = configInput(Pointer, confInput, from);
if (foundPointer) {
Pointer->options = xf86addNewOption(NULL,
xnfstrdup("AlwaysCore"), "on");
servlayoutp->inputs = addDevice(servlayoutp->inputs, Pointer);
}
}
confInput = NULL;
/* 1. Check for the -keyboard command line option. */