summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Zang <aaron.zang@sun.com>2010-08-11 18:55:59 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2010-08-11 18:57:32 -0700
commitf8e219828db920c4cd7a2645a6194de029dc9bb5 (patch)
treee009b17f0e54f1e4fc8e911a119109ceb7da2707
parentbfb1b7a319eab8e13542cfc00b8407121eabb4d5 (diff)
downloadxorg-driver-xf86-input-keyboard-f8e219828db920c4cd7a2645a6194de029dc9bb5.tar.gz
Close device fd when called with DEVICE_CLOSE
Fixes Solaris bug 6886424: VT - keyboard and mouse do not work when switching to vt7 http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6886424 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/kbd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/kbd.c b/src/kbd.c
index 96409cf..991fe01 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -464,6 +464,14 @@ KbdProc(DeviceIntPtr device, int what)
RemoveEnabledDevice(pInfo->fd);
pKbd->KbdOff(pInfo, what);
device->public.on = FALSE;
+
+ if (what == DEVICE_CLOSE) {
+ xf86Msg(X_INFO, "%s: Close\n", pInfo->name);
+ if (pInfo->fd != -1) {
+ close(pInfo->fd);
+ pInfo->fd = -1;
+ }
+ }
break;
}
return (Success);