wipe glyph cache as needed when re-entering text mode

now the console is readable again when leaving X
This commit is contained in:
macallan 2016-09-16 22:39:35 +00:00
parent f47e9f5683
commit f2615f2d9a
1 changed files with 11 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cgfourteen.c,v 1.81 2016/06/02 21:19:24 macallan Exp $ */
/* $NetBSD: cgfourteen.c,v 1.82 2016/09/16 22:39:35 macallan Exp $ */
/*
* Copyright (c) 1996
@ -418,9 +418,13 @@ cgfourteenclose(dev_t dev, int flags, int mode, struct lwp *l)
/*
* Restore video state to make the PROM happy, on last close.
*/
if (opens == 0)
if (opens == 0) {
cg14_reset(sc);
#if NSX > 0
if (sc->sc_sx)
glyphcache_wipe(&sc->sc_gc);
#endif
}
return (0);
}
@ -918,6 +922,10 @@ cg14_ioctl(void *v, void *vs, u_long cmd, void *data, int flag,
cg14_set_depth(sc, 8);
cg14_init_cmap(sc);
#if NSX > 0
if (sc->sc_sx)
glyphcache_wipe(&sc->sc_gc);
#endif
vcons_redraw_screen(ms);
} else {