Restore VGA mode on vt switch. It fix VESA mode left by Xorg on exit.
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
57a9b881a3
commit
92762d566e
@ -75,12 +75,14 @@ static vd_init_t vga_init;
|
||||
static vd_blank_t vga_blank;
|
||||
static vd_bitbltchr_t vga_bitbltchr;
|
||||
static vd_putchar_t vga_putchar;
|
||||
static vd_postswitch_t vga_postswitch;
|
||||
|
||||
static const struct vt_driver vt_vga_driver = {
|
||||
.vd_init = vga_init,
|
||||
.vd_blank = vga_blank,
|
||||
.vd_bitbltchr = vga_bitbltchr,
|
||||
.vd_putchar = vga_putchar,
|
||||
.vd_postswitch = vga_postswitch,
|
||||
.vd_priority = VD_PRIORITY_GENERIC,
|
||||
};
|
||||
|
||||
@ -602,3 +604,13 @@ vga_init(struct vt_device *vd)
|
||||
|
||||
return (CN_INTERNAL);
|
||||
}
|
||||
|
||||
static void
|
||||
vga_postswitch(struct vt_device *vd)
|
||||
{
|
||||
|
||||
/* Reinit VGA mode, to restore view after app which change mode. */
|
||||
vga_initialize(vd, (vd->vd_flags & VDF_TEXTMODE));
|
||||
/* Ask vt(9) to update chars on visible area. */
|
||||
vd->vd_flags |= VDF_INVALID;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user