aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2016-08-18 16:22:40 +0000
committerEd Maste <emaste@FreeBSD.org>2016-08-18 16:22:40 +0000
commit198204396111b94b9dc12d577e6a8f343b7f1d3e (patch)
tree60bd3a8cacc5d0bfb3cf2c914c49a7e44945a600
parent3e7e23332f7cc9b42c8a03339b89e53de3f78610 (diff)
downloadsrc-198204396111b94b9dc12d577e6a8f343b7f1d3e.tar.gz
src-198204396111b94b9dc12d577e6a8f343b7f1d3e.zip
vt: fix old keyboard release in CONS_SETKBD
On the first switch we previously released the newly allocated keyboard instead of the old one. Keyboard state was very confused afterwards for further keyboard switches. Submitted by: bde
Notes
Notes: svn path=/head/; revision=304430
-rw-r--r--sys/dev/vt/vt_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
index e09e8a786b3c..361f6283ab3a 100644
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -2359,6 +2359,7 @@ skip_thunk:
(void *)vd, vt_kbdevent, vd);
if (i >= 0) {
if (vd->vd_keyboard != -1) {
+ kbd = kbd_get_keyboard(vd->vd_keyboard);
vt_save_kbd_state(vd->vd_curwindow, kbd);
kbd_release(kbd, (void *)vd);
}