* Thu Oct 11 2007 Adam Jackson <ajax@redhat.com> 1.3.0.0-30
- xserver-1.3.0-avoid-ps2-probe.patch: /dev/input/mice is always ExplorerPS/2, so don't waste time on startup probing for it.
This commit is contained in:
parent
a133a7b192
commit
a346b95ad6
@ -9,7 +9,7 @@
|
|||||||
Summary: X.Org X11 X server
|
Summary: X.Org X11 X server
|
||||||
Name: xorg-x11-server
|
Name: xorg-x11-server
|
||||||
Version: 1.3.0.0
|
Version: 1.3.0.0
|
||||||
Release: 29%{?dist}
|
Release: 30%{?dist}
|
||||||
URL: http://www.x.org
|
URL: http://www.x.org
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: User Interface/X
|
Group: User Interface/X
|
||||||
@ -60,6 +60,7 @@ Patch1014: xserver-1.3.0-newglx-offscreen-pixmaps.patch
|
|||||||
Patch1015: xserver-1.3.0-randr-updates.patch
|
Patch1015: xserver-1.3.0-randr-updates.patch
|
||||||
Patch1022: xserver-1.3.0-default-dpi.patch
|
Patch1022: xserver-1.3.0-default-dpi.patch
|
||||||
Patch1023: xserver-1.3.0-randr-preferred-mode-fix.patch
|
Patch1023: xserver-1.3.0-randr-preferred-mode-fix.patch
|
||||||
|
Patch1024: xserver-1.3.0-avoid-ps2-probe.patch
|
||||||
|
|
||||||
Patch2001: xserver-1.2.0-geode-mmx.patch
|
Patch2001: xserver-1.2.0-geode-mmx.patch
|
||||||
Patch2002: xserver-1.2.0-xephyr-keysym-madness.patch
|
Patch2002: xserver-1.2.0-xephyr-keysym-madness.patch
|
||||||
@ -322,6 +323,7 @@ Xserver source code needed to build VNC server (Xvnc)
|
|||||||
%patch1015 -p1 -b .randr-update
|
%patch1015 -p1 -b .randr-update
|
||||||
%patch1022 -p1 -b .dpi
|
%patch1022 -p1 -b .dpi
|
||||||
%patch1023 -p1 -b .randr-preferred
|
%patch1023 -p1 -b .randr-preferred
|
||||||
|
%patch1024 -p1 -b .ps2-probe
|
||||||
|
|
||||||
%patch2001 -p1 -b .geode-mmx
|
%patch2001 -p1 -b .geode-mmx
|
||||||
%patch2002 -p1 -b .xephyr-keysym
|
%patch2002 -p1 -b .xephyr-keysym
|
||||||
@ -610,6 +612,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Oct 11 2007 Adam Jackson <ajax@redhat.com> 1.3.0.0-30
|
||||||
|
- xserver-1.3.0-avoid-ps2-probe.patch: /dev/input/mice is always ExplorerPS/2,
|
||||||
|
so don't waste time on startup probing for it.
|
||||||
|
|
||||||
* Fri Oct 05 2007 Adam Jackson <ajax@redhat.com> 1.3.0.0-29
|
* Fri Oct 05 2007 Adam Jackson <ajax@redhat.com> 1.3.0.0-29
|
||||||
- xserver-1.3.0-randr-preferred-mode-fix.patch: Fix infinite loop on X
|
- xserver-1.3.0-randr-preferred-mode-fix.patch: Fix infinite loop on X
|
||||||
startup when a mode is requested in the config file. (#318731)
|
startup when a mode is requested in the config file. (#318731)
|
||||||
|
113
xserver-1.3.0-avoid-ps2-probe.patch
Normal file
113
xserver-1.3.0-avoid-ps2-probe.patch
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
diff -up xorg-server-1.3.0.0/hw/xfree86/loader/loadmod.c.jx xorg-server-1.3.0.0/hw/xfree86/loader/loadmod.c
|
||||||
|
--- xorg-server-1.3.0.0/hw/xfree86/loader/loadmod.c.jx 2007-04-16 12:37:51.000000000 -0400
|
||||||
|
+++ xorg-server-1.3.0.0/hw/xfree86/loader/loadmod.c 2007-10-10 19:13:47.000000000 -0400
|
||||||
|
@@ -408,7 +408,8 @@ FindModuleInSubdir(const char *dirpath,
|
||||||
|
while ((direntry = readdir(dir))) {
|
||||||
|
if (direntry->d_name[0] == '.')
|
||||||
|
continue;
|
||||||
|
- if ((stat(direntry->d_name, &stat_buf) == 0) && S_ISDIR(stat_buf.st_mode)) {
|
||||||
|
+
|
||||||
|
+ if (direntry->d_type == DT_DIR) {
|
||||||
|
snprintf(tmpBuf, PATH_MAX, "%s/%s", dirpath, direntry->d_name);
|
||||||
|
if ((ret = FindModuleInSubdir(tmpBuf, module)))
|
||||||
|
break;
|
||||||
|
@@ -525,8 +526,7 @@ LoaderListDirs(const char **subdirlist,
|
||||||
|
if (dirlen + strlen(dp->d_name) > PATH_MAX)
|
||||||
|
continue;
|
||||||
|
strcpy(fp, dp->d_name);
|
||||||
|
- if (!(stat(buf, &stat_buf) == 0 &&
|
||||||
|
- S_ISREG(stat_buf.st_mode)))
|
||||||
|
+ if (dp->d_type == DT_REG)
|
||||||
|
continue;
|
||||||
|
for (p = patterns; p->pattern; p++) {
|
||||||
|
if (regexec(&p->rex, dp->d_name, 2, match, 0) == 0 &&
|
||||||
|
diff -up xorg-server-1.3.0.0/hw/xfree86/os-support/linux/lnx_mouse.c.jx xorg-server-1.3.0.0/hw/xfree86/os-support/linux/lnx_mouse.c
|
||||||
|
--- xorg-server-1.3.0.0/hw/xfree86/os-support/linux/lnx_mouse.c.jx 2006-09-18 02:04:18.000000000 -0400
|
||||||
|
+++ xorg-server-1.3.0.0/hw/xfree86/os-support/linux/lnx_mouse.c 2007-10-11 09:53:33.000000000 -0400
|
||||||
|
@@ -45,7 +45,8 @@ typedef enum {
|
||||||
|
MOUSE_PROTO_SERIAL,
|
||||||
|
MOUSE_PROTO_PS2,
|
||||||
|
MOUSE_PROTO_MSC,
|
||||||
|
- MOUSE_PROTO_GPM
|
||||||
|
+ MOUSE_PROTO_GPM,
|
||||||
|
+ MOUSE_PROTO_EXPPS2,
|
||||||
|
} protocolTypes;
|
||||||
|
|
||||||
|
static struct {
|
||||||
|
@@ -55,7 +56,8 @@ static struct {
|
||||||
|
{ MOUSE_PROTO_UNKNOWN, NULL },
|
||||||
|
{ MOUSE_PROTO_PS2, "PS/2" },
|
||||||
|
{ MOUSE_PROTO_MSC, "MouseSystems" },
|
||||||
|
- { MOUSE_PROTO_GPM, "GPM" }
|
||||||
|
+ { MOUSE_PROTO_GPM, "GPM" },
|
||||||
|
+ { MOUSE_PROTO_EXPPS2, "ExplorerPS/2" },
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
@@ -87,7 +89,7 @@ FindDevice(InputInfoPtr pInfo, const cha
|
||||||
|
}
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
-GuessProtocol(InputInfoPtr pInfo, int flags)
|
||||||
|
+lnxMouseMagic(InputInfoPtr pInfo)
|
||||||
|
{
|
||||||
|
int fd = -1;
|
||||||
|
const char *dev;
|
||||||
|
@@ -137,8 +139,10 @@ GuessProtocol(InputInfoPtr pInfo, int fl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (strcmp(realdev, DEFAULT_PS2_DEV) == 0)
|
||||||
|
- proto = MOUSE_PROTO_PS2;
|
||||||
|
+ if (strcmp(realdev, DEFAULT_MOUSE_DEV) == 0)
|
||||||
|
+ proto = MOUSE_PROTO_EXPPS2;
|
||||||
|
+ else if (strcmp(realdev, DEFAULT_PS2_DEV) == 0)
|
||||||
|
+ proto = MOUSE_PROTO_EXPPS2;
|
||||||
|
else if (strcmp(realdev, DEFAULT_GPM_DATA_DEV) == 0)
|
||||||
|
proto = MOUSE_PROTO_MSC;
|
||||||
|
else if (strcmp(realdev, DEFAULT_GPM_CTL_DEV) == 0)
|
||||||
|
@@ -171,15 +175,14 @@ GuessProtocol(InputInfoPtr pInfo, int fl
|
||||||
|
close(fd);
|
||||||
|
}
|
||||||
|
if (proto == MOUSE_PROTO_UNKNOWN) {
|
||||||
|
- xf86Msg(X_ERROR, "%s: GuessProtocol: Cannot find mouse protocol.\n",
|
||||||
|
+ xf86Msg(X_ERROR, "%s: Cannot find mouse protocol.\n",
|
||||||
|
pInfo->name);
|
||||||
|
return NULL;
|
||||||
|
} else {
|
||||||
|
for (i = 0; i < sizeof(devproto)/sizeof(devproto[0]); i++) {
|
||||||
|
if (devproto[i].proto == proto) {
|
||||||
|
xf86Msg(X_INFO,
|
||||||
|
- "%s: GuessProtocol: "
|
||||||
|
- "setting mouse protocol to \"%s\"\n",
|
||||||
|
+ "%s: Setting mouse protocol to \"%s\"\n",
|
||||||
|
pInfo->name, devproto[i].name);
|
||||||
|
return devproto[i].name;
|
||||||
|
}
|
||||||
|
@@ -188,6 +191,18 @@ GuessProtocol(InputInfoPtr pInfo, int fl
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static const char *
|
||||||
|
+GuessProtocol(InputInfoPtr pInfo, int flags)
|
||||||
|
+{
|
||||||
|
+ return lnxMouseMagic(pInfo);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static const char *
|
||||||
|
+SetupAuto(InputInfoPtr pInfo, int *protoPara)
|
||||||
|
+{
|
||||||
|
+ return lnxMouseMagic(pInfo);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
_X_EXPORT OSMouseInfoPtr
|
||||||
|
xf86OSMouseInit(int flags)
|
||||||
|
{
|
||||||
|
@@ -200,6 +215,7 @@ xf86OSMouseInit(int flags)
|
||||||
|
p->DefaultProtocol = DefaultProtocol;
|
||||||
|
p->FindDevice = FindDevice;
|
||||||
|
p->GuessProtocol = GuessProtocol;
|
||||||
|
+ p->SetupAuto = SetupAuto;
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user