]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vt(4): Change the terminal and buffer sizes, even without a font
authorJean-Sébastien Pédron <dumbbell@FreeBSD.org>
Mon, 8 Sep 2014 07:37:03 +0000 (07:37 +0000)
committerJean-Sébastien Pédron <dumbbell@FreeBSD.org>
Mon, 8 Sep 2014 07:37:03 +0000 (07:37 +0000)
commit313ef9368f0dbc2e02dbf1fdc438fcd6f98b00a1
tree383c917a0b96705d096f013b7dfcafc4b45f7dc6
parent9dd099b274b56bfedf0f8e9cd53e22905b657868
vt(4): Change the terminal and buffer sizes, even without a font

This fixes a bug where scroll lock would not work for tty #0 when using
vt_vga's textmode. The reason was that this window is created with a
static 256x100 buffer, larger than the real size of 80x25.

Now, in vt_change_font() and vt_compute_drawable_area(), we still
perform operations even of the window has no font loaded (this is the
case in textmode here vw->vw_font == NULL). One of these operation
resizes the buffer accordingly.

In vt_compute_drawable_area(), we take the terminal size as is (ie.
80x25) for the drawable area.

The font argument to vt_set_border() is removed (it was never used) and
the code now uses the computed drawable area instead of re-doing its own
calculation.

Reported by: Harald Schmalzbauer <h.schmalzbauer_omnilan.de>
Tested by: Harald Schmalzbauer <h.schmalzbauer_omnilan.de>
MFC after: 3 days
sys/dev/vt/vt_core.c