summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-06-05 19:16:09 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-06-05 19:16:09 +0000
commitaac7d7dfa246963a15e76b0e32b9c913eaec4440 (patch)
treec29100c82ea54664d7aae5f4c220892a335616a3 /sys
parent3ee348ca0af084ca4a5384f6fc73ca5027882301 (diff)
Clear screen to clean up after X.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc64/dev/machfb.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/machfb.c b/sys/arch/sparc64/dev/machfb.c
index 309e2df5bc1..61dac6d2a2e 100644
--- a/sys/arch/sparc64/dev/machfb.c
+++ b/sys/arch/sparc64/dev/machfb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machfb.c,v 1.4 2009/06/03 03:05:30 kettenis Exp $ */
+/* $OpenBSD: machfb.c,v 1.5 2009/06/05 19:16:08 kettenis Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis.
@@ -335,8 +335,17 @@ machfb_ioctl(void *v, u_long cmd, caddr_t data, int flags, struct proc *p)
break;
case WSDISPLAYIO_SMODE:
sc->sc_mode = *(u_int *)data;
- if (sc->sc_mode == WSDISPLAYIO_MODE_EMUL)
+ if (sc->sc_mode == WSDISPLAYIO_MODE_EMUL) {
+ struct rasops_info *ri = &sc->sc_sunfb.sf_ro;
+
+ /* Restore colormap. */
fbwscons_setcolormap(&sc->sc_sunfb, machfb_setcolor);
+
+ /* Clear screen. */
+ ri = &sc->sc_sunfb.sf_ro;
+ machfb_fillrect(sc, 0, 0, ri->ri_width, ri->ri_height,
+ ri->ri_devcmap[WSCOL_WHITE]);
+ }
break;
case WSDISPLAYIO_GINFO:
wdf = (void *)data;