diff options
author | Aaron Zang <aaron.zang@sun.com> | 2010-08-11 18:55:59 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-08-11 18:57:32 -0700 |
commit | f8e219828db920c4cd7a2645a6194de029dc9bb5 (patch) | |
tree | e009b17f0e54f1e4fc8e911a119109ceb7da2707 | |
parent | bfb1b7a319eab8e13542cfc00b8407121eabb4d5 (diff) | |
download | xorg-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.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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); |