summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2017-02-10 14:54:20 +0000
committeremaste <emaste@FreeBSD.org>2017-02-10 14:54:20 +0000
commit0e91252b71227a4546df7c3ffb28108959535a1e (patch)
tree91cc5df09012dbbc7f4c855d151d46d4c07a2db4
parenta3333518b3765c87587c4a47863f1a9ebdaf3634 (diff)
downloadFreeBSD-src-0e91252b71227a4546df7c3ffb28108959535a1e.zip
FreeBSD-src-0e91252b71227a4546df7c3ffb28108959535a1e.tar.gz
MFC r304430: 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
-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 e09e8a7..361f628 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);
}
OpenPOWER on IntegriCloud