[PATCH 01/17] Revert "Attempt to add the 'mouse' driver in more situations."

Peter Hutterer peter.hutterer at who-t.net
Sun Aug 7 23:20:57 PDT 2011


This reverts commit 43d9edd31e31b33b9da4a50d8ab05004881c8d5a.

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 at who-t.net>
---
 hw/xfree86/common/xf86Config.c |   35 -----------------------------------
 1 files changed, 0 insertions(+), 35 deletions(-)

diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 8670e53..25755fd 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -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. */
-- 
1.7.6



More information about the xorg-devel mailing list