]> CyberLeo.Net >> Repos - FreeBSD/releng/10.1.git/commit
vt(4): Save/restore keyboard mode & LED states when switching window
authordumbbell <dumbbell@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Oct 2014 19:01:11 +0000 (19:01 +0000)
committerdumbbell <dumbbell@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 14 Oct 2014 19:01:11 +0000 (19:01 +0000)
commit23adb321dba88e2e78784f93d58a01e4fb5b95a3
tree6bd820c063d95dabad8f2ca14db126e568a08dba
parent8a8cce059c415e963fb776af7397821790acbb7d
vt(4): Save/restore keyboard mode & LED states when switching window

MF10: r273036
MFC: r272416

Add new functions to manipulate these mode & state, instead of calling
kbdd_ioctl() everyhere.

This fixes at least two bugs:

    1. The state of the Scroll Lock LED and the state of scroll mode
       could be out-of-sync. For instance, if one enables scroll mode on
       window #1 and switches to window #2, the LED would remain on, but
       the window wouldn't be in scroll mode.

       Similarily, when switching between a console and an X.Org
       session, the LED states could be inconsistent with the real
       state.

    2. When exiting from an X.Org session, the user could be unable to
       type anything. The workaround was to switch to another console
       window and come back.

Differential Revision: https://reviews.freebsd.org/D821
Reviewed by: ray@
Approved by: re (marius), ray@
Tested by: kwm@

git-svn-id: svn://svn.freebsd.org/base/releng/10.1@273103 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/vt/vt.h
sys/dev/vt/vt_core.c