Module Name:    xsrc
Committed By:   jmcneill
Date:           Sat Oct 22 15:00:41 UTC 2011

Modified Files:
        xsrc/external/mit/xorg-server/dist/hw/xfree86/common: xf86Config.c
        xsrc/external/mit/xorg-server/dist/hw/xfree86/parser: Device.c
            xf86Parser.h

Log Message:
if the video driver is "vmware" or "vmwlegacy" and no mouse section exists,
use the "vmmouse" input driver instead of "mouse" -- now xorg works properly
in vmware without a config file


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
    xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c
cvs rdiff -u -r1.1.1.3 -r1.2 \
    xsrc/external/mit/xorg-server/dist/hw/xfree86/parser/Device.c
cvs rdiff -u -r1.1.1.4 -r1.2 \
    xsrc/external/mit/xorg-server/dist/hw/xfree86/parser/xf86Parser.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c:1.8 xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c:1.9
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c:1.8	Sun Oct  9 11:14:43 2011
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Config.c	Sat Oct 22 15:00:40 2011
@@ -1207,6 +1207,14 @@ checkCoreInputDevices(serverLayoutPtr se
     if (!foundPointer && xf86Info.forceInputDevices) {
 	memset(&defPtr, 0, sizeof(defPtr));
 	defPtr.inp_identifier = strdup("<default pointer>");
+#if defined(__NetBSD__) && (defined(__i386__) || defined(__amd64__))
+	if (xf86findDeviceByDriver("vmware", xf86configptr->conf_device_lst) ||
+	    xf86findDeviceByDriver("vmwlegacy", xf86configptr->conf_device_lst)) {
+		defPtr.inp_driver = strdup("vmmouse");
+		defPtr.inp_option_lst = xf86addNewOption(defPtr.inp_option_lst, strdup("Protocol"), "wsmouse");
+		defPtr.inp_option_lst = xf86addNewOption(defPtr.inp_option_lst, strdup("Device"), "/dev/wsmouse");
+	} else
+#endif
 	defPtr.inp_driver = strdup("mouse");
 	confInput = &defPtr;
 	foundPointer = TRUE;

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/parser/Device.c
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/parser/Device.c:1.1.1.3 xsrc/external/mit/xorg-server/dist/hw/xfree86/parser/Device.c:1.2
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/parser/Device.c:1.1.1.3	Tue Nov 23 05:21:44 2010
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/parser/Device.c	Sat Oct 22 15:00:40 2011
@@ -369,3 +369,16 @@ xf86findDevice (const char *ident, XF86C
 	}
 	return NULL;
 }
+
+XF86ConfDevicePtr
+xf86findDeviceByDriver (const char *driver, XF86ConfDevicePtr p)
+{
+	while (p)
+	{
+		if (xf86nameCompare (driver, p->dev_driver) == 0)
+			return p;
+
+		p = p->list.next;
+	}
+	return NULL;
+}

Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/parser/xf86Parser.h
diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/parser/xf86Parser.h:1.1.1.4 xsrc/external/mit/xorg-server/dist/hw/xfree86/parser/xf86Parser.h:1.2
--- xsrc/external/mit/xorg-server/dist/hw/xfree86/parser/xf86Parser.h:1.1.1.4	Tue Aug  2 06:56:57 2011
+++ xsrc/external/mit/xorg-server/dist/hw/xfree86/parser/xf86Parser.h	Sat Oct 22 15:00:40 2011
@@ -496,6 +496,7 @@ extern void xf86closeConfigFile(void);
 extern void xf86freeConfig(XF86ConfigPtr p);
 extern int xf86writeConfigFile(const char *, XF86ConfigPtr);
 extern _X_EXPORT XF86ConfDevicePtr xf86findDevice(const char *ident, XF86ConfDevicePtr p);
+extern _X_EXPORT XF86ConfDevicePtr xf86findDeviceByDriver(const char *driver, XF86ConfDevicePtr p);
 extern _X_EXPORT XF86ConfLayoutPtr xf86findLayout(const char *name, XF86ConfLayoutPtr list);
 extern _X_EXPORT XF86ConfMonitorPtr xf86findMonitor(const char *ident, XF86ConfMonitorPtr p);
 extern _X_EXPORT XF86ConfModesPtr xf86findModes(const char *ident, XF86ConfModesPtr p);

Reply via email to