summaryrefslogtreecommitdiff
path: root/packages/nonworking/xfree86/xfree86-4.3.0/tinyx-tslib-reset-and-vt-switch-fixes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packages/nonworking/xfree86/xfree86-4.3.0/tinyx-tslib-reset-and-vt-switch-fixes.patch')
-rw-r--r--packages/nonworking/xfree86/xfree86-4.3.0/tinyx-tslib-reset-and-vt-switch-fixes.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/packages/nonworking/xfree86/xfree86-4.3.0/tinyx-tslib-reset-and-vt-switch-fixes.patch b/packages/nonworking/xfree86/xfree86-4.3.0/tinyx-tslib-reset-and-vt-switch-fixes.patch
index e69de29bb2..dc1cc86343 100644
--- a/packages/nonworking/xfree86/xfree86-4.3.0/tinyx-tslib-reset-and-vt-switch-fixes.patch
+++ b/packages/nonworking/xfree86/xfree86-4.3.0/tinyx-tslib-reset-and-vt-switch-fixes.patch
@@ -0,0 +1,69 @@
+--- xc/programs/Xserver/hw/kdrive/linux/tslib.c.orig 2002-11-05 05:28:06.000000000 +0000
++++ xc/programs/Xserver/hw/kdrive/linux/tslib.c 2003-03-11 21:11:37.000000000 +0000
+@@ -119,6 +119,29 @@
+ int TsInputType;
+
+ int
++TslibEnable (int not_needed_fd, void *closure)
++{
++ KdMouseInfo *mi = closure;
++ int fd = 0;
++
++ if(!(tsDev = ts_open(mi->name, 0))) {
++ fprintf(stderr, "%s() failed to open %s\n", __func__, mi->name );
++ return -1; /* XXX Not sure what to return here */
++ }
++
++ ts_config(tsDev);
++ fd=ts_fd(tsDev);
++
++ return fd;
++}
++
++void
++TslibDisable (int fd, void *closure)
++{
++ ts_close(tsDev);
++}
++
++int
+ TslibInit (void)
+ {
+ int i;
+@@ -128,7 +151,7 @@
+
+ if (!TsInputType)
+ TsInputType = KdAllocInputType ();
+-
++
+ for (mi = kdMouseInfo; mi; mi = next)
+ {
+ next = mi->next;
+@@ -148,14 +171,25 @@
+ break;
+ }
+ }
++ } else {
++
++ if(!(tsDev = ts_open(mi->name,0)))
++ continue;
++ ts_config(tsDev);
++ fd=ts_fd(tsDev);
++
+ }
+
+ if (fd > 0 && tsDev != 0)
+ {
+ mi->driver = (void *) fd;
+ mi->inputType = TsInputType;
+- if (KdRegisterFd (TsInputType, fd, TsRead, (void *) mi))
+- n++;
++ if (KdRegisterFd (TsInputType, fd, TsRead, (void *) mi))
++ n++;
++
++ /* Set callbacks for vt switches etc */
++ KdRegisterFdEnableDisable (fd, TslibEnable, TslibDisable);
++
+ }
+ else
+ if (fd > 0) close(fd);