diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-11-25 19:11:44 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-11-25 19:11:44 +0000 |
commit | 0201f0a8d3dd10e191320cb08bf1cc95c72e132c (patch) | |
tree | ce15d13e5f5956024bdca2a06c0dcd0266800532 /sys/dev | |
parent | 9651aee4b75b2a8c7918c1391b21ae0ed7e3947f (diff) |
Ask the emulation code to hide the cursor when leaving emulation mode. This
way we do not get a phantom cursor image when X exits.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/wscons/wsdisplay.c | 6 | ||||
-rw-r--r-- | sys/dev/wscons/wsemul_dumb.c | 8 | ||||
-rw-r--r-- | sys/dev/wscons/wsemul_sun.c | 6 | ||||
-rw-r--r-- | sys/dev/wscons/wsemul_vt100.c | 6 | ||||
-rw-r--r-- | sys/dev/wscons/wsemulvar.h | 5 |
5 files changed, 23 insertions, 8 deletions
diff --git a/sys/dev/wscons/wsdisplay.c b/sys/dev/wscons/wsdisplay.c index b032feb5281..3a0fa809971 100644 --- a/sys/dev/wscons/wsdisplay.c +++ b/sys/dev/wscons/wsdisplay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplay.c,v 1.82 2007/11/24 16:45:59 miod Exp $ */ +/* $OpenBSD: wsdisplay.c,v 1.83 2007/11/25 19:11:42 miod Exp $ */ /* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */ /* @@ -1134,6 +1134,10 @@ wsdisplay_internal_ioctl(struct wsdisplay_softc *sc, struct wsscreen *scr, wsmoused_release(sc); #endif + /* clear cursor */ + (*scr->scr_dconf->wsemul->reset) + (scr->scr_dconf->wsemulcookie, WSEMUL_CLEARCURSOR); + #ifdef BURNER_SUPPORT /* disable the burner while X is running */ if (sc->sc_burnout) diff --git a/sys/dev/wscons/wsemul_dumb.c b/sys/dev/wscons/wsemul_dumb.c index a347703988f..983b15557a3 100644 --- a/sys/dev/wscons/wsemul_dumb.c +++ b/sys/dev/wscons/wsemul_dumb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsemul_dumb.c,v 1.4 2007/03/07 06:23:04 miod Exp $ */ +/* $OpenBSD: wsemul_dumb.c,v 1.5 2007/11/25 19:11:42 miod Exp $ */ /* $NetBSD: wsemul_dumb.c,v 1.7 2000/01/05 11:19:36 drochner Exp $ */ /* @@ -31,8 +31,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include <sys/cdefs.h> - #include <sys/param.h> #include <sys/systm.h> #include <sys/time.h> @@ -267,6 +265,10 @@ wsemul_dumb_resetop(cookie, op) edp->ccol = edp->crow = 0; (*edp->emulops->cursor)(edp->emulcookie, 1, 0, 0); break; + case WSEMUL_CLEARCURSOR: + (*edp->emulops->cursor)(edp->emulcookie, 0, + edp->crow, edp->ccol); + break; default: break; } diff --git a/sys/dev/wscons/wsemul_sun.c b/sys/dev/wscons/wsemul_sun.c index cfb8d9c5624..2558d4bcc0a 100644 --- a/sys/dev/wscons/wsemul_sun.c +++ b/sys/dev/wscons/wsemul_sun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsemul_sun.c,v 1.20 2007/02/14 01:12:16 jsg Exp $ */ +/* $OpenBSD: wsemul_sun.c,v 1.21 2007/11/25 19:11:42 miod Exp $ */ /* $NetBSD: wsemul_sun.c,v 1.11 2000/01/05 11:19:36 drochner Exp $ */ /* @@ -874,6 +874,10 @@ wsemul_sun_resetop(cookie, op) edp->ccol = edp->crow = 0; (*edp->emulops->cursor)(edp->emulcookie, 1, 0, 0); break; + case WSEMUL_CLEARCURSOR: + (*edp->emulops->cursor)(edp->emulcookie, 0, + edp->crow, edp->ccol); + break; default: break; } diff --git a/sys/dev/wscons/wsemul_vt100.c b/sys/dev/wscons/wsemul_vt100.c index 1b376ddd123..4ee96d99a59 100644 --- a/sys/dev/wscons/wsemul_vt100.c +++ b/sys/dev/wscons/wsemul_vt100.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsemul_vt100.c,v 1.20 2007/09/11 13:39:34 gilles Exp $ */ +/* $OpenBSD: wsemul_vt100.c,v 1.21 2007/11/25 19:11:43 miod Exp $ */ /* $NetBSD: wsemul_vt100.c,v 1.13 2000/04/28 21:56:16 mycroft Exp $ */ /* @@ -268,6 +268,10 @@ wsemul_vt100_resetop(cookie, op) (*edp->emulops->cursor)(edp->emulcookie, edp->flags & VTFL_CURSORON, 0, 0); break; + case WSEMUL_CLEARCURSOR: + (*edp->emulops->cursor)(edp->emulcookie, 0, + edp->crow, edp->ccol); + break; default: break; } diff --git a/sys/dev/wscons/wsemulvar.h b/sys/dev/wscons/wsemulvar.h index 4c19f5c91c3..94e3f505509 100644 --- a/sys/dev/wscons/wsemulvar.h +++ b/sys/dev/wscons/wsemulvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wsemulvar.h,v 1.7 2006/12/09 20:06:48 miod Exp $ */ +/* $OpenBSD: wsemulvar.h,v 1.8 2007/11/25 19:11:43 miod Exp $ */ /* $NetBSD: wsemulvar.h,v 1.6 1999/01/17 15:46:15 drochner Exp $ */ /* @@ -37,7 +37,8 @@ struct wsdisplay_emulops; enum wsemul_resetops { WSEMUL_RESET, WSEMUL_SYNCFONT, - WSEMUL_CLEARSCREEN + WSEMUL_CLEARSCREEN, + WSEMUL_CLEARCURSOR }; struct wsemul_ops { |