1
0
xorg-x11-server/p_bug96328.diff
Stefan Dirsch 7e6a980b1f Accepting request 35298 from home:oertel:branches:openSUSE:Factory
Copy from home:oertel:branches:openSUSE:Factory/xorg-x11-server via accept of submit request 35298 revision 8.
Request was accepted with message:
reviewed ok.

OBS-URL: https://build.opensuse.org/request/show/35298
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=229
2010-03-20 02:42:15 +00:00

53 lines
1.2 KiB
Diff

Index: hw/xfree86/common/xf86Configure.c
================================================================================
--- hw/xfree86/common/xf86Configure.c
+++ hw/xfree86/common/xf86Configure.c
@@ -250,23 +250,35 @@
/* Crude mechanism to auto-detect mouse (os dependent) */
{
- int fd;
+ int fd = -1;
#ifdef WSCONS_SUPPORT
- fd = open("/dev/wsmouse", 0);
- if (fd >= 0) {
- DFLT_MOUSE_DEV = "/dev/wsmouse";
- DFLT_MOUSE_PROTO = "wsmouse";
- close(fd);
- } else {
- ErrorF("cannot open /dev/wsmouse\n");
+ if (fd == -1) {
+ fd = open("/dev/wsmouse", 0);
+ if (fd != -1) {
+ DFLT_MOUSE_DEV = "/dev/wsmouse";
+ DFLT_MOUSE_PROTO = "wsmouse";
+ close(fd);
+ } else {
+ ErrorF("cannot open /dev/wsmouse\n");
+ }
}
#endif
#ifndef __SCO__
- fd = open(DFLT_MOUSE_DEV, 0);
- if (fd != -1) {
- foundMouse = TRUE;
- close(fd);
+ if (fd == -1) {
+ fd = open(DFLT_MOUSE_DEV, 0);
+# ifdef linux
+ if (fd == -1) {
+ char *name = "/dev/input/mice";
+ fd = open(name, 0);
+ if (fd != -1)
+ DFLT_MOUSE_DEV = name;
+ }
+# endif
+ if (fd != -1) {
+ foundMouse = TRUE;
+ close(fd);
+ }
}
#else
foundMouse = TRUE;