summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Blundell <pb@reciva.com>2003-11-08 18:51:59 +0000
committerPhil Blundell <pb@reciva.com>2003-11-08 18:51:59 +0000
commitd694b44259ff51cfca2c3ec9a58bf164010cc1ad (patch)
tree30add715ba980703acc36b7b70e45b1f757a8696
parent3e18c6363454aa87e1ad8c121019bab185e613b8 (diff)
Avoid ugly shell error when libXdmcp isn't present.
New functions. (TsInit): Register them.
-rw-r--r--hw/kdrive/linux/ts.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/hw/kdrive/linux/ts.c b/hw/kdrive/linux/ts.c
index c24570f91..9051c0d61 100644
--- a/hw/kdrive/linux/ts.c
+++ b/hw/kdrive/linux/ts.c
@@ -132,6 +132,20 @@ char *TsNames[] = {
int TsInputType;
static int
+TsEnable (int fd, void *closure)
+{
+ KdMouseInfo *mi = (KdMouseInfo *)closure;
+
+ return open (mi->name, 0);
+}
+
+static void
+TsDisable (int fd, void *closure)
+{
+ close (fd);
+}
+
+static int
TsInit (void)
{
int i;
@@ -172,7 +186,12 @@ TsInit (void)
mi->driver = (void *) fd;
mi->inputType = TsInputType;
if (KdRegisterFd (TsInputType, fd, TsRead, (void *) mi))
+ {
+ /* Set callbacks for vt switches etc */
+ KdRegisterFdEnableDisable (fd, TsEnable, TsDisable);
+
n++;
+ }
}
else
close (fd);